Skip to content

Add promql/features#1761

Merged
prymitive merged 2 commits intomainfrom
parser
Apr 16, 2026
Merged

Add promql/features#1761
prymitive merged 2 commits intomainfrom
parser

Conversation

@prymitive
Copy link
Copy Markdown
Collaborator

v3.11 introduced changes to the parser, we can now configure different features.

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request was validated by pint.

✔️ No problems found

Stats

Stat Value
Version v0.79.0-120-gd6f07bd4
Number of rules parsed 9
Number of rules checked 9
Number of problems found 0
Number of offline checks 0
Number of online checks 0
Checks duration 0

Problems

No problems reported

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.43%. Comparing base (7b22a0e) to head (d6f07bd).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1761      +/-   ##
==========================================
+ Coverage   99.41%   99.43%   +0.01%     
==========================================
  Files         109      112       +3     
  Lines       13203    13609     +406     
==========================================
+ Hits        13126    13532     +406     
  Misses         42       42              
  Partials       35       35              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 13, 2026

Benchmark diff:

goos: linux
goarch: amd64
pkg: github.com/cloudflare/pint/cmd/pint
cpu: AMD EPYC 7763 64-Core Processor                
                    │   old.txt   │              new.txt               │
                    │   sec/op    │   sec/op     vs base               │
GlobFinder-4          19.10m ± 2%   19.82m ± 4%  +3.78% (p=0.002 n=10)
GitFinder-4           367.9m ± 1%   368.8m ± 1%       ~ (p=0.481 n=10)
CheckRules-4           9.595 ± 1%    9.625 ± 1%       ~ (p=0.529 n=10)
RuleIsIdentical-4     5.277m ± 1%   5.255m ± 2%       ~ (p=0.280 n=10)
GetChecksForEntry-4   113.6m ± 1%   115.2m ± 2%  +1.39% (p=0.004 n=10)
geomean               132.2m        133.6m       +1.05%

                    │    old.txt     │                new.txt                │
                    │      B/op      │     B/op      vs base                 │
GlobFinder-4          7.134Mi ± 0%     7.134Mi ± 0%  -0.01% (p=0.015 n=10)
GitFinder-4           16.08Mi ± 1%     16.09Mi ± 1%       ~ (p=0.529 n=10)
CheckRules-4          876.7Mi ± 0%     880.4Mi ± 0%  +0.42% (p=0.002 n=10)
RuleIsIdentical-4       0.000 ± 0%       0.000 ± 0%       ~ (p=1.000 n=10) ¹
GetChecksForEntry-4   56.55Mi ± 0%     56.68Mi ± 0%  +0.22% (p=0.000 n=10)
geomean                            ²                 +0.13%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                    │    old.txt    │               new.txt                │
                    │   allocs/op   │  allocs/op   vs base                 │
GlobFinder-4          111.0k ± 0%     111.0k ± 0%       ~ (p=0.474 n=10)
GitFinder-4           148.7k ± 0%     148.7k ± 0%  +0.01% (p=0.009 n=10)
CheckRules-4          9.670M ± 0%     9.707M ± 0%  +0.38% (p=0.000 n=10)
RuleIsIdentical-4      0.000 ± 0%      0.000 ± 0%       ~ (p=1.000 n=10) ¹
GetChecksForEntry-4   916.3k ± 0%     921.8k ± 0%  +0.60% (p=0.000 n=10)
geomean                           ²                +0.20%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean

pkg: github.com/cloudflare/pint/internal/parser
        │   old.txt   │            new.txt            │
        │   sec/op    │   sec/op     vs base          │
Parse-4   17.23m ± 2%   17.41m ± 2%  ~ (p=0.190 n=10)

        │   old.txt    │            new.txt             │
        │     B/op     │     B/op      vs base          │
Parse-4   6.306Mi ± 0%   6.306Mi ± 0%  ~ (p=0.060 n=10)

        │   old.txt   │             new.txt             │
        │  allocs/op  │  allocs/op   vs base            │
Parse-4   102.7k ± 0%   102.7k ± 0%  ~ (p=1.000 n=10) ¹
¹ all samples are equal

pkg: github.com/cloudflare/pint/internal/parser/source
               │   old.txt   │               new.txt               │
               │   sec/op    │   sec/op     vs base                │
LabelsSource-4   5.949m ± 2%   7.553m ± 2%  +26.95% (p=0.000 n=10)

               │   old.txt    │               new.txt                │
               │     B/op     │     B/op      vs base                │
LabelsSource-4   4.441Mi ± 0%   5.702Mi ± 0%  +28.39% (p=0.000 n=10)

               │   old.txt   │               new.txt               │
               │  allocs/op  │  allocs/op   vs base                │
LabelsSource-4   36.34k ± 0%   46.76k ± 0%  +28.66% (p=0.000 n=10)

pkg: github.com/cloudflare/pint/internal/promapi
                    │   old.txt   │            new.txt            │
                    │   sec/op    │   sec/op     vs base          │
QueryCacheOnlySet-4   105.0n ± 2%   105.4n ± 1%  ~ (p=0.539 n=10)

                    │  old.txt   │            new.txt             │
                    │    B/op    │    B/op     vs base            │
QueryCacheOnlySet-4   64.00 ± 0%   64.00 ± 0%  ~ (p=1.000 n=10) ¹
¹ all samples are equal

                    │  old.txt   │            new.txt             │
                    │ allocs/op  │ allocs/op   vs base            │
QueryCacheOnlySet-4   1.000 ± 0%   1.000 ± 0%  ~ (p=1.000 n=10) ¹
¹ all samples are equal

@prymitive prymitive force-pushed the parser branch 7 times, most recently from a80c5ce to 30fabc7 Compare April 16, 2026 11:09
@prymitive prymitive changed the title Configure parser features Add promql/features Apr 16, 2026
@prymitive prymitive force-pushed the parser branch 2 times, most recently from 7a7c326 to 52f1901 Compare April 16, 2026 13:37
v3.11 introduced changes to the parser, we can now configure different features.
We're going to enable all but expose info which query uses which features (if any).
@prymitive prymitive force-pushed the parser branch 2 times, most recently from 09e0e6f to 35edc52 Compare April 16, 2026 16:02
@prymitive prymitive enabled auto-merge April 16, 2026 16:24
@prymitive prymitive merged commit e744b40 into main Apr 16, 2026
20 checks passed
@prymitive prymitive deleted the parser branch April 16, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants