Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow matching on rule state #1079

Merged
merged 3 commits into from
Aug 23, 2024
Merged

Allow matching on rule state #1079

merged 3 commits into from
Aug 23, 2024

Conversation

prymitive
Copy link
Collaborator

No description provided.

Copy link

github-actions bot commented Aug 22, 2024

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.81m ± 1%   39.87m ± 3%       ~ (p=0.481 n=10)
CheckRules-4     8.507 ± 2%
geomean         581.9m        39.87m       +0.16%                ¹
¹ benchmark set differs from baseline; geomeans may not be comparable

              │   old.txt    │                new.txt                │
              │     B/op     │     B/op      vs base                 │
FindEntries-4   27.41Mi ± 0%   27.41Mi ± 0%       ~ (p=0.089 n=10)
CheckRules-4    979.1Mi ± 0%
geomean         163.8Mi        27.41Mi       +0.01%                ¹
¹ benchmark set differs from baseline; geomeans may not be comparable

              │   old.txt   │               new.txt                │
              │  allocs/op  │  allocs/op   vs base                 │
FindEntries-4   131.9k ± 0%   131.9k ± 0%  +0.00% (p=0.032 n=10)
CheckRules-4    14.19M ± 0%
geomean         1.368M        131.9k       +0.00%                ¹
¹ benchmark set differs from baseline; geomeans may not be comparable

@codecov-commenter
Copy link

codecov-commenter commented Aug 22, 2024

Codecov Report

Attention: Patch coverage is 98.38337% with 7 lines in your changes missing coverage. Please review.

Project coverage is 94.89%. Comparing base (ef91e8b) to head (8c3a9ab).

Files Patch % Lines
cmd/pint/scan.go 66.66% 6 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1079      +/-   ##
==========================================
+ Coverage   94.84%   94.89%   +0.04%     
==========================================
  Files         100      102       +2     
  Lines       10086    10184      +98     
==========================================
+ Hits         9566     9664      +98     
  Misses        365      365              
  Partials      155      155              

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

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.64.0-43-g8c3a9ab
Number of rules parsed 4
Number of rules checked 4
Number of problems found 0
Number of offline checks 0
Number of online checks 0
Checks duration 0

Problems

No problems reported

@@ -3,7 +3,7 @@ groups:
rules:
- alert: Service Is Down
expr: up == 0
for: 0s
for: 0m

Choose a reason for hiding this comment

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

ℹ️ Information reported by pint alerts/for check.


0m is the default value of for, consider removing this redundant line.


ℹ️ To see documentation covering this check and instructions on how to resolve it click here.

@prymitive prymitive merged commit cf70caa into main Aug 23, 2024
20 checks passed
@prymitive prymitive deleted the state branch August 23, 2024 16:58
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