cloudflare / pint

Prometheus rule linter/validator
https://cloudflare.github.io/pint/
Apache License 2.0
877 stars 53 forks source link

Add dead code detection #1182

Closed prymitive closed 3 weeks ago

github-actions[bot] commented 3 weeks ago

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               │
FindEntries-4   39.56m ± 1%   39.18m ± 2%       ~ (p=0.280 n=10)
CheckRules-4     8.518 ± 2%    8.516 ± 2%       ~ (p=1.000 n=10)
geomean         580.5m        577.7m       -0.48%

              │   old.txt    │               new.txt               │
              │     B/op     │     B/op      vs base               │
FindEntries-4   27.41Mi ± 0%   27.41Mi ± 0%       ~ (p=0.105 n=10)
CheckRules-4    976.1Mi ± 0%   976.2Mi ± 0%       ~ (p=0.853 n=10)
geomean         163.6Mi        163.6Mi       +0.00%

              │   old.txt   │              new.txt               │
              │  allocs/op  │  allocs/op   vs base               │
FindEntries-4   131.9k ± 0%   131.9k ± 0%       ~ (p=0.236 n=10)
CheckRules-4    14.15M ± 0%   14.15M ± 0%       ~ (p=0.796 n=10)
geomean         1.366M        1.366M       -0.00%
codecov-commenter commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.99%. Comparing base (cfce591) to head (aaea75c).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1182 +/- ## ========================================== + Coverage 94.96% 94.99% +0.02% ========================================== Files 104 104 Lines 12499 12559 +60 ========================================== + Hits 11870 11930 +60 Misses 480 480 Partials 149 149 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.