Skip to content

Fix some bugs#1888

Merged
prymitive merged 3 commits into
mainfrom
bugs
Jun 12, 2026
Merged

Fix some bugs#1888
prymitive merged 3 commits into
mainfrom
bugs

Conversation

@prymitive

Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

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.85.0-48-gd34a1201
Number of rules parsed 22
Number of rules checked 22
Number of problems found 0
Number of offline checks 0
Number of online checks 0
Checks duration 5ms

Problems

No problems reported

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (b13a87c) to head (d34a120).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1888   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          114       114           
  Lines        15000     14998    -2     
=========================================
- Hits         15000     14998    -2     

☔ View full report in Codecov by Harness.
📢 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

Benchmark diff:

goos: linux
goarch: amd64
pkg: github.com/cloudflare/pint/cmd/pint
cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                             │   old.txt    │              new.txt               │
                             │    sec/op    │    sec/op     vs base              │
GlobFinder                     39.82m ± ∞ ¹   39.30m ± ∞ ¹       ~ (p=0.093 n=6)
GitFinder                      456.0m ± ∞ ¹   439.3m ± ∞ ¹  -3.65% (p=0.015 n=6)
Check/query/cost               24.82m ± ∞ ¹   25.09m ± ∞ ¹       ~ (p=0.180 n=6)
Check/alerts/template          252.8m ± ∞ ¹   267.2m ± ∞ ¹       ~ (p=0.065 n=6)
Check/rule/dependency          25.24m ± ∞ ¹   24.78m ± ∞ ¹  -1.82% (p=0.004 n=6)
Check/promql/impossible        124.0µ ± ∞ ¹   120.6µ ± ∞ ¹  -2.71% (p=0.002 n=6)
Check/promql/nan               2.037m ± ∞ ¹   1.995m ± ∞ ¹  -2.06% (p=0.002 n=6)
Check/group/interval           3.978µ ± ∞ ¹   4.004µ ± ∞ ¹       ~ (p=0.370 n=6)
Check/alerts/absent            76.86µ ± ∞ ¹   78.31µ ± ∞ ¹  +1.89% (p=0.002 n=6)
Check/alerts/annotation        566.6µ ± ∞ ¹   549.6µ ± ∞ ¹  -3.00% (p=0.002 n=6)
Check/promql/fragile           100.1µ ± ∞ ¹   104.3µ ± ∞ ¹  +4.15% (p=0.002 n=6)
Check/promql/series             1.104 ± ∞ ¹    1.111 ± ∞ ¹       ~ (p=1.000 n=6)
Check/rule/label               1.827m ± ∞ ¹   1.860m ± ∞ ¹       ~ (p=0.485 n=6)
Check/promql/offset            3.312m ± ∞ ¹   3.217m ± ∞ ¹  -2.85% (p=0.026 n=6)
Check/promql/syntax            20.84µ ± ∞ ¹   21.05µ ± ∞ ¹  +1.01% (p=0.002 n=6)
Check/alerts/comparison        52.80µ ± ∞ ¹   53.37µ ± ∞ ¹  +1.07% (p=0.026 n=6)
Check/promql/regexp            1.652m ± ∞ ¹   1.544m ± ∞ ¹  -6.57% (p=0.002 n=6)
Check/promql/range_query       3.388m ± ∞ ¹   3.147m ± ∞ ¹  -7.11% (p=0.002 n=6)
Check/rule/duplicate           21.40m ± ∞ ¹   21.51m ± ∞ ¹       ~ (p=0.093 n=6)
Check/labels/conflict          2.179m ± ∞ ¹   2.171m ± ∞ ¹       ~ (p=0.240 n=6)
Check/alerts/external_labels   52.65m ± ∞ ¹   51.68m ± ∞ ¹  -1.85% (p=0.015 n=6)
Check/alerts/for               176.7µ ± ∞ ¹   175.3µ ± ∞ ¹       ~ (p=0.132 n=6)
Check/promql/rate              4.944m ± ∞ ¹   4.777m ± ∞ ¹  -3.38% (p=0.009 n=6)
Check/promql/vector_matching   21.36m ± ∞ ¹   21.35m ± ∞ ¹       ~ (p=0.699 n=6)
Check/promql/counter           3.317m ± ∞ ¹   3.161m ± ∞ ¹  -4.69% (p=0.002 n=6)
Check/promql/features          119.5µ ± ∞ ¹   120.5µ ± ∞ ¹  +0.80% (p=0.015 n=6)
Check/alerts/count             13.92m ± ∞ ¹   14.24m ± ∞ ¹       ~ (p=0.589 n=6)
Check/rule/reject              156.7µ ± ∞ ¹   155.2µ ± ∞ ¹  -0.98% (p=0.002 n=6)
RuleIsIdentical                16.86m ± ∞ ¹   16.78m ± ∞ ¹  -0.47% (p=0.041 n=6)
GetChecksForEntry              286.6m ± ∞ ¹   288.5m ± ∞ ¹       ~ (p=0.394 n=6)
geomean                        2.928m         2.906m        -0.75%
¹ need >= 8 samples for confidence interval at level 0.99

                             │    old.txt    │                new.txt                │
                             │     B/op      │     B/op       vs base                │
GlobFinder                     12.77Mi ± ∞ ¹   12.77Mi ± ∞ ¹       ~ (p=0.145 n=6)
GitFinder                      25.89Mi ± ∞ ¹   25.89Mi ± ∞ ¹       ~ (p=0.916 n=6)
Check/query/cost               525.0Ki ± ∞ ¹   525.0Ki ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/template          112.4Mi ± ∞ ¹   112.4Mi ± ∞ ¹  -0.00% (p=0.002 n=6)
Check/rule/dependency          15.90Mi ± ∞ ¹   15.90Mi ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/impossible          704.0 ± ∞ ¹     704.0 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/nan               191.6Ki ± ∞ ¹   191.6Ki ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/group/interval             0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/absent            3.812Ki ± ∞ ¹   3.812Ki ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/annotation          0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/fragile           15.50Ki ± ∞ ¹   15.50Ki ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/series            98.53Mi ± ∞ ¹   98.53Mi ± ∞ ¹       ~ (p=0.675 n=6)
Check/rule/label               685.7Ki ± ∞ ¹   685.7Ki ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/offset            418.5Ki ± ∞ ¹   418.5Ki ± ∞ ¹       ~ (p=1.000 n=6)
Check/promql/syntax              0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/comparison          352.0 ± ∞ ¹     352.0 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/regexp            477.6Ki ± ∞ ¹   477.6Ki ± ∞ ¹  +0.00% (p=0.015 n=6)
Check/promql/range_query       418.0Ki ± ∞ ¹   418.0Ki ± ∞ ¹  +0.00% (p=0.009 n=6)
Check/rule/duplicate             0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/labels/conflict          275.8Ki ± ∞ ¹   275.8Ki ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/external_labels   18.58Mi ± ∞ ¹   18.58Mi ± ∞ ¹       ~ (p=0.242 n=6)
Check/alerts/for               88.41Ki ± ∞ ¹   88.41Ki ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/rate              379.1Ki ± ∞ ¹   379.1Ki ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/vector_matching   8.181Mi ± ∞ ¹   8.181Mi ± ∞ ¹       ~ (p=0.623 n=6)
Check/promql/counter           454.8Ki ± ∞ ¹   455.1Ki ± ∞ ¹  +0.08% (p=0.002 n=6)
Check/promql/features            0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/count             1.465Mi ± ∞ ¹   1.489Mi ± ∞ ¹       ~ (p=0.418 n=6)
Check/rule/reject                0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
RuleIsIdentical                  0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
GetChecksForEntry              99.93Mi ± ∞ ¹   99.93Mi ± ∞ ¹       ~ (p=1.000 n=6)
geomean                                    ³                  +0.06%               ³
¹ need >= 8 samples for confidence interval at level 0.99
² all samples are equal
³ summaries must be >0 to compute geomean

                             │   old.txt    │               new.txt                │
                             │  allocs/op   │  allocs/op    vs base                │
GlobFinder                     197.8k ± ∞ ¹   197.8k ± ∞ ¹       ~ (p=1.000 n=6)
GitFinder                      243.4k ± ∞ ¹   243.4k ± ∞ ¹       ~ (p=0.751 n=6)
Check/query/cost               7.624k ± ∞ ¹   7.624k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/template          1.046M ± ∞ ¹   1.046M ± ∞ ¹  -0.00% (p=0.002 n=6)
Check/rule/dependency          7.632k ± ∞ ¹   7.632k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/impossible         5.000 ± ∞ ¹    5.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/nan               3.652k ± ∞ ¹   3.652k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/group/interval            0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/absent             76.00 ± ∞ ¹    76.00 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/annotation         0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/fragile            246.0 ± ∞ ¹    246.0 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/series            1.418M ± ∞ ¹   1.418M ± ∞ ¹       ~ (p=1.000 n=6)
Check/rule/label               11.45k ± ∞ ¹   11.45k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/offset            12.42k ± ∞ ¹   12.42k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/syntax             0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/comparison         4.000 ± ∞ ¹    4.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/regexp            8.587k ± ∞ ¹   8.587k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/range_query       12.41k ± ∞ ¹   12.41k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/rule/duplicate            0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/labels/conflict          5.724k ± ∞ ¹   5.724k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/external_labels   321.8k ± ∞ ¹   321.8k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/for               1.476k ± ∞ ¹   1.476k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/rate              8.202k ± ∞ ¹   8.202k ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/promql/vector_matching   90.51k ± ∞ ¹   90.51k ± ∞ ¹       ~ (p=0.892 n=6)
Check/promql/counter           24.14k ± ∞ ¹   24.14k ± ∞ ¹  +0.04% (p=0.002 n=6)
Check/promql/features           0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
Check/alerts/count             33.57k ± ∞ ¹   33.89k ± ∞ ¹       ~ (p=0.610 n=6)
Check/rule/reject               0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
RuleIsIdentical                 0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=6) ²
GetChecksForEntry              1.654M ± ∞ ¹   1.654M ± ∞ ¹       ~ (p=1.000 n=6)
geomean                                   ³                 +0.03%               ³
¹ need >= 8 samples for confidence interval at level 0.99
² all samples are equal
³ summaries must be >0 to compute geomean

pkg: github.com/cloudflare/pint/internal/diags
                           │   old.txt    │              new.txt               │
                           │    sec/op    │    sec/op     vs base              │
InjectDiagnosticsLongExpr    8.753µ ± ∞ ¹   8.796µ ± ∞ ¹       ~ (p=1.000 n=6)
InjectDiagnosticsShortExpr   1.279µ ± ∞ ¹   1.281µ ± ∞ ¹       ~ (p=0.284 n=6)
geomean                      3.346µ         3.357µ        +0.32%
¹ need >= 8 samples for confidence interval at level 0.99

                           │    old.txt    │                new.txt                │
                           │     B/op      │     B/op       vs base                │
InjectDiagnosticsLongExpr    3.578Ki ± ∞ ¹   3.578Ki ± ∞ ¹       ~ (p=1.000 n=6) ²
InjectDiagnosticsShortExpr     304.0 ± ∞ ¹     304.0 ± ∞ ¹       ~ (p=1.000 n=6) ²
geomean                      1.031Ki         1.031Ki        +0.00%
¹ need >= 8 samples for confidence interval at level 0.99
² all samples are equal

                           │   old.txt   │               new.txt               │
                           │  allocs/op  │  allocs/op   vs base                │
InjectDiagnosticsLongExpr    39.00 ± ∞ ¹   39.00 ± ∞ ¹       ~ (p=1.000 n=6) ²
InjectDiagnosticsShortExpr   13.00 ± ∞ ¹   13.00 ± ∞ ¹       ~ (p=1.000 n=6) ²
geomean                      22.52         22.52        +0.00%
¹ need >= 8 samples for confidence interval at level 0.99
² all samples are equal

pkg: github.com/cloudflare/pint/internal/parser
      │   old.txt    │            new.txt            │
      │    sec/op    │    sec/op     vs base         │
Parse   19.23m ± ∞ ¹   19.55m ± ∞ ¹  ~ (p=0.093 n=6)
¹ need >= 8 samples for confidence interval at level 0.99

      │    old.txt    │            new.txt             │
      │     B/op      │     B/op       vs base         │
Parse   6.385Mi ± ∞ ¹   6.385Mi ± ∞ ¹  ~ (p=0.699 n=6)
¹ need >= 8 samples for confidence interval at level 0.99

      │   old.txt    │            new.txt            │
      │  allocs/op   │  allocs/op    vs base         │
Parse   102.8k ± ∞ ¹   102.8k ± ∞ ¹  ~ (p=0.455 n=6)
¹ need >= 8 samples for confidence interval at level 0.99

pkg: github.com/cloudflare/pint/internal/parser/source
             │   old.txt    │            new.txt            │
             │    sec/op    │    sec/op     vs base         │
LabelsSource   1.179m ± ∞ ¹   1.175m ± ∞ ¹  ~ (p=0.394 n=6)
¹ need >= 8 samples for confidence interval at level 0.99

             │    old.txt    │            new.txt             │
             │     B/op      │     B/op       vs base         │
LabelsSource   755.0Ki ± ∞ ¹   755.0Ki ± ∞ ¹  ~ (p=0.675 n=6)
¹ need >= 8 samples for confidence interval at level 0.99

             │   old.txt    │             new.txt             │
             │  allocs/op   │  allocs/op    vs base           │
LabelsSource   7.251k ± ∞ ¹   7.251k ± ∞ ¹  ~ (p=1.000 n=6) ²
¹ need >= 8 samples for confidence interval at level 0.99
² all samples are equal

pkg: github.com/cloudflare/pint/internal/promapi
                  │   old.txt    │              new.txt               │
                  │    sec/op    │    sec/op     vs base              │
QueryCacheOnlySet   111.3n ± ∞ ¹   114.9n ± ∞ ¹  +3.28% (p=0.002 n=6)
¹ need >= 8 samples for confidence interval at level 0.99

                  │   old.txt   │            new.txt             │
                  │    B/op     │    B/op      vs base           │
QueryCacheOnlySet   64.00 ± ∞ ¹   64.00 ± ∞ ¹  ~ (p=1.000 n=6) ²
¹ need >= 8 samples for confidence interval at level 0.99
² all samples are equal

                  │   old.txt   │            new.txt             │
                  │  allocs/op  │  allocs/op   vs base           │
QueryCacheOnlySet   1.000 ± ∞ ¹   1.000 ± ∞ ¹  ~ (p=1.000 n=6) ²
¹ need >= 8 samples for confidence interval at level 0.99
² all samples are equal

@prymitive prymitive merged commit ba28eb4 into main Jun 12, 2026
20 checks passed
@prymitive prymitive deleted the bugs branch June 12, 2026 07:53
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