Skip to content

Add promql/selector check#1547

Merged
prymitive merged 1 commit intomainfrom
promql/selector
Sep 26, 2025
Merged

Add promql/selector check#1547
prymitive merged 1 commit intomainfrom
promql/selector

Conversation

@prymitive
Copy link
Collaborator

Fixes #1416 and #1540.

Copy link

@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.74.8-30-gbff1913e
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

@github-actions
Copy link

github-actions bot commented Sep 26, 2025

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          30.26m ± ∞ ¹   30.86m ± ∞ ¹  +1.97% (p=0.008 n=5)
GitFinder-4           386.1m ± ∞ ¹   388.9m ± ∞ ¹       ~ (p=0.151 n=5)
CheckRules-4           9.508 ± ∞ ¹    9.517 ± ∞ ¹       ~ (p=0.841 n=5)
RuleIsIdentical-4     5.975m ± ∞ ¹   5.949m ± ∞ ¹       ~ (p=0.841 n=5)
GetChecksForEntry-4   119.6m ± ∞ ¹   116.8m ± ∞ ¹  -2.35% (p=0.032 n=5)
geomean               151.3m         151.3m        -0.01%
¹ need >= 6 samples for confidence interval at level 0.95

                    │    old.txt    │                new.txt                │
                    │     B/op      │     B/op       vs base                │
GlobFinder-4          9.494Mi ± ∞ ¹   9.494Mi ± ∞ ¹       ~ (p=0.690 n=5)
GitFinder-4           19.57Mi ± ∞ ¹   19.57Mi ± ∞ ¹       ~ (p=1.000 n=5)
CheckRules-4          1.103Gi ± ∞ ¹   1.100Gi ± ∞ ¹       ~ (p=0.421 n=5)
RuleIsIdentical-4       0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
GetChecksForEntry-4   61.11Mi ± ∞ ¹   61.11Mi ± ∞ ¹       ~ (p=1.000 n=5)
geomean                           ³                  -0.06%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ summaries must be >0 to compute geomean

                    │   old.txt    │               new.txt                │
                    │  allocs/op   │  allocs/op    vs base                │
GlobFinder-4          145.2k ± ∞ ¹   145.2k ± ∞ ¹       ~ (p=0.810 n=5)
GitFinder-4           191.6k ± ∞ ¹   191.6k ± ∞ ¹       ~ (p=0.881 n=5)
CheckRules-4          16.07M ± ∞ ¹   16.06M ± ∞ ¹       ~ (p=0.056 n=5)
RuleIsIdentical-4      0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
GetChecksForEntry-4   924.0k ± ∞ ¹   924.0k ± ∞ ¹       ~ (p=0.960 n=5)
geomean                          ³                 -0.01%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² 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   23.96m ± ∞ ¹   23.82m ± ∞ ¹  ~ (p=1.000 n=5)
¹ need >= 6 samples for confidence interval at level 0.95

        │    old.txt    │            new.txt             │
        │     B/op      │     B/op       vs base         │
Parse-4   7.308Mi ± ∞ ¹   7.309Mi ± ∞ ¹  ~ (p=0.310 n=5)
¹ need >= 6 samples for confidence interval at level 0.95

        │   old.txt    │            new.txt            │
        │  allocs/op   │  allocs/op    vs base         │
Parse-4   125.7k ± ∞ ¹   125.7k ± ∞ ¹  ~ (p=1.000 n=5)
¹ need >= 6 samples for confidence interval at level 0.95

pkg: github.com/cloudflare/pint/internal/promapi
                    │   old.txt    │              new.txt               │
                    │    sec/op    │    sec/op     vs base              │
QueryCacheOnlySet-4   104.5n ± ∞ ¹   104.4n ± ∞ ¹       ~ (p=0.643 n=5)
QueryCacheSetGrow-4   406.1n ± ∞ ¹   403.6n ± ∞ ¹       ~ (p=0.730 n=5)
QueryCacheGetMiss-4   16.27n ± ∞ ¹   16.25n ± ∞ ¹       ~ (p=0.460 n=5)
QueryCacheGC-4        56.11µ ± ∞ ¹   55.76µ ± ∞ ¹       ~ (p=0.222 n=5)
QueryCacheGCNoop-4    83.27µ ± ∞ ¹   82.72µ ± ∞ ¹       ~ (p=0.056 n=5)
geomean               1.264µ         1.259µ        -0.42%
¹ need >= 6 samples for confidence interval at level 0.95

                    │    old.txt    │                new.txt                │
                    │     B/op      │     B/op       vs base                │
QueryCacheOnlySet-4     64.00 ± ∞ ¹     64.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheSetGrow-4     139.0 ± ∞ ¹     138.0 ± ∞ ¹       ~ (p=0.730 n=5)
QueryCacheGetMiss-4     0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC-4        36.13Ki ± ∞ ¹   36.13Ki ± ∞ ¹       ~ (p=1.000 n=5)
QueryCacheGCNoop-4    54.17Ki ± ∞ ¹   54.16Ki ± ∞ ¹  -0.00% (p=0.048 n=5)
geomean                           ³                  -0.14%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ summaries must be >0 to compute geomean

                    │   old.txt   │               new.txt               │
                    │  allocs/op  │  allocs/op   vs base                │
QueryCacheOnlySet-4   1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheSetGrow-4   1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGetMiss-4   0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC-4        6.000 ± ∞ ¹   6.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGCNoop-4    9.000 ± ∞ ¹   9.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
geomean                         ³                +0.00%               ³
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ summaries must be >0 to compute geomean

@codecov-commenter
Copy link

codecov-commenter commented Sep 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.42%. Comparing base (5152719) to head (bff1913).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1547      +/-   ##
==========================================
+ Coverage   96.37%   96.42%   +0.04%     
==========================================
  Files         106      109       +3     
  Lines       14996    15178     +182     
==========================================
+ Hits        14453    14635     +182     
  Misses        403      403              
  Partials      140      140              

☔ 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.

@prymitive prymitive merged commit c16df45 into main Sep 26, 2025
21 checks passed
@prymitive prymitive deleted the promql/selector branch September 26, 2025 15:27
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.

Check to reject using unscoped, "naked" selectors in queries

2 participants