Skip to content

Track labels usage in label_join and label_replace#1632

Merged
prymitive merged 4 commits intomainfrom
issue-1631
Nov 28, 2025
Merged

Track labels usage in label_join and label_replace#1632
prymitive merged 4 commits intomainfrom
issue-1631

Conversation

@prymitive
Copy link
Collaborator

Fixes #1631.

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.77.1-30-g34d2a1f9
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

codecov-commenter commented Nov 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.10%. Comparing base (e3c758a) to head (34d2a1f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1632   +/-   ##
=======================================
  Coverage   97.09%   97.10%           
=======================================
  Files         109      109           
  Lines       13248    13279   +31     
=======================================
+ Hits        12863    12894   +31     
  Misses        254      254           
  Partials      131      131           

☔ 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

github-actions bot commented Nov 28, 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          18.70m ± ∞ ¹   18.59m ± ∞ ¹       ~ (p=0.421 n=5)
GitFinder-4           369.9m ± ∞ ¹   369.6m ± ∞ ¹       ~ (p=0.548 n=5)
CheckRules-4           9.428 ± ∞ ¹    9.490 ± ∞ ¹       ~ (p=1.000 n=5)
RuleIsIdentical-4     5.642m ± ∞ ¹   5.659m ± ∞ ¹       ~ (p=0.421 n=5)
GetChecksForEntry-4   107.1m ± ∞ ¹   110.2m ± ∞ ¹  +2.90% (p=0.008 n=5)
geomean               131.6m         132.4m        +0.62%
¹ need >= 6 samples for confidence interval at level 0.95

                    │    old.txt    │                new.txt                │
                    │     B/op      │     B/op       vs base                │
GlobFinder-4          7.136Mi ± ∞ ¹   7.137Mi ± ∞ ¹       ~ (p=0.421 n=5)
GitFinder-4           15.96Mi ± ∞ ¹   15.97Mi ± ∞ ¹       ~ (p=1.000 n=5)
CheckRules-4          983.0Mi ± ∞ ¹   983.9Mi ± ∞ ¹       ~ (p=0.310 n=5)
RuleIsIdentical-4       0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
GetChecksForEntry-4   56.55Mi ± ∞ ¹   56.55Mi ± ∞ ¹       ~ (p=1.000 n=5)
geomean                           ³                  +0.02%               ³
¹ 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          111.6k ± ∞ ¹   111.6k ± ∞ ¹       ~ (p=1.000 n=5)
GitFinder-4           151.1k ± ∞ ¹   151.1k ± ∞ ¹       ~ (p=0.571 n=5)
CheckRules-4          14.69M ± ∞ ¹   14.70M ± ∞ ¹       ~ (p=0.095 n=5)
RuleIsIdentical-4      0.000 ± ∞ ¹    0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
GetChecksForEntry-4   915.8k ± ∞ ¹   915.8k ± ∞ ¹       ~ (p=0.857 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   16.66m ± ∞ ¹   16.24m ± ∞ ¹  ~ (p=0.095 n=5)
¹ need >= 6 samples for confidence interval at level 0.95

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

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

pkg: github.com/cloudflare/pint/internal/parser/source
               │   old.txt    │              new.txt               │
               │    sec/op    │    sec/op     vs base              │
LabelsSource-4   5.052m ± ∞ ¹   5.359m ± ∞ ¹  +6.08% (p=0.008 n=5)
¹ need >= 6 samples for confidence interval at level 0.95

               │    old.txt    │               new.txt               │
               │     B/op      │     B/op       vs base              │
LabelsSource-4   4.084Mi ± ∞ ¹   4.358Mi ± ∞ ¹  +6.72% (p=0.008 n=5)
¹ need >= 6 samples for confidence interval at level 0.95

               │   old.txt    │              new.txt               │
               │  allocs/op   │  allocs/op    vs base              │
LabelsSource-4   33.54k ± ∞ ¹   35.70k ± ∞ ¹  +6.42% (p=0.008 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   102.2n ± ∞ ¹   101.5n ± ∞ ¹       ~ (p=0.087 n=5)
QueryCacheSetGrow-4   397.1n ± ∞ ¹   409.6n ± ∞ ¹       ~ (p=0.548 n=5)
QueryCacheGetMiss-4   16.33n ± ∞ ¹   16.33n ± ∞ ¹       ~ (p=0.754 n=5)
QueryCacheGC/0%-4     32.76µ ± ∞ ¹   33.53µ ± ∞ ¹       ~ (p=0.095 n=5)
QueryCacheGC/1%-4     34.09µ ± ∞ ¹   34.66µ ± ∞ ¹       ~ (p=0.151 n=5)
QueryCacheGC/10%-4    38.99µ ± ∞ ¹   38.30µ ± ∞ ¹       ~ (p=0.151 n=5)
QueryCacheGC/20%-4    67.40µ ± ∞ ¹   67.13µ ± ∞ ¹       ~ (p=1.000 n=5)
QueryCacheGC/25%-4    66.62µ ± ∞ ¹   66.91µ ± ∞ ¹       ~ (p=0.310 n=5)
QueryCacheGC/50%-4    65.08µ ± ∞ ¹   65.46µ ± ∞ ¹       ~ (p=0.310 n=5)
QueryCacheGC/75%-4    49.36µ ± ∞ ¹   49.54µ ± ∞ ¹       ~ (p=1.000 n=5)
QueryCacheGC/99%-4    48.59µ ± ∞ ¹   49.38µ ± ∞ ¹       ~ (p=0.151 n=5)
QueryCacheGC/100%-4   49.78µ ± ∞ ¹   49.55µ ± ∞ ¹       ~ (p=0.548 n=5)
geomean               10.01µ         10.06µ        +0.56%
¹ 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 ± ∞ ¹     136.0 ± ∞ ¹       ~ (p=0.540 n=5)
QueryCacheGetMiss-4     0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/0%-4       0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/1%-4       0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/10%-4      0.000 ± ∞ ¹     0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/20%-4    18.09Ki ± ∞ ¹   18.09Ki ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/25%-4    18.09Ki ± ∞ ¹   18.09Ki ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/50%-4    18.09Ki ± ∞ ¹   18.09Ki ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/75%-4      48.00 ± ∞ ¹     48.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/99%-4      48.00 ± ∞ ¹     48.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/100%-4     48.00 ± ∞ ¹     48.00 ± ∞ ¹       ~ (p=1.000 n=5) ²
geomean                           ³                  -0.18%               ³
¹ 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/0%-4     0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/1%-4     0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/10%-4    0.000 ± ∞ ¹   0.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/20%-4    4.000 ± ∞ ¹   4.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/25%-4    4.000 ± ∞ ¹   4.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/50%-4    4.000 ± ∞ ¹   4.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/75%-4    1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/99%-4    1.000 ± ∞ ¹   1.000 ± ∞ ¹       ~ (p=1.000 n=5) ²
QueryCacheGC/100%-4   1.000 ± ∞ ¹   1.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

@prymitive prymitive merged commit bc26d9f into main Nov 28, 2025
21 checks passed
@prymitive prymitive deleted the issue-1631 branch November 28, 2025 12:42
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.

promql/impossible doesn't understand label renaming

2 participants