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

Get rid of rulefmt.Parse #1016

Merged
merged 1 commit into from
Jul 4, 2024
Merged

Get rid of rulefmt.Parse #1016

merged 1 commit into from
Jul 4, 2024

Conversation

prymitive
Copy link
Collaborator

No description provided.

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.60.0-35-gf9e7354
Number of rules parsed 4
Number of rules checked 0
Number of problems found 0
Number of offline checks 0
Number of online checks 0
Checks duration 0

Problems

No problems reported

Copy link

github-actions bot commented Jun 28, 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   108.02m ± 1%   39.15m ± 6%  -63.75% (p=0.000 n=10)
CheckRules-4      8.515 ± 2%    8.516 ± 2%        ~ (p=0.853 n=10)
geomean          959.0m        577.4m       -39.79%

              │   old.txt    │               new.txt                │
              │     B/op     │     B/op      vs base                │
FindEntries-4   53.94Mi ± 0%   27.38Mi ± 0%  -49.23% (p=0.000 n=10)
CheckRules-4    936.9Mi ± 0%   936.2Mi ± 0%        ~ (p=0.796 n=10)
geomean         224.8Mi        160.1Mi       -28.78%

              │   old.txt   │               new.txt               │
              │  allocs/op  │  allocs/op   vs base                │
FindEntries-4   434.9k ± 0%   131.6k ± 0%  -69.75% (p=0.000 n=10)
CheckRules-4    13.93M ± 0%   13.93M ± 0%        ~ (p=0.912 n=10)
geomean         2.461M        1.354M       -45.00%

@codecov-commenter
Copy link

codecov-commenter commented Jun 28, 2024

Codecov Report

Attention: Patch coverage is 77.14286% with 48 lines in your changes missing coverage. Please review.

Project coverage is 94.04%. Comparing base (0e6bbd7) to head (6c9daba).

Files Patch % Lines
internal/parser/strict.go 67.37% 41 Missing and 5 partials ⚠️
cmd/pint/scan.go 71.42% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1016      +/-   ##
==========================================
- Coverage   94.37%   94.04%   -0.33%     
==========================================
  Files          95       96       +1     
  Lines        9580     9727     +147     
==========================================
+ Hits         9041     9148     +107     
- Misses        381      418      +37     
- Partials      158      161       +3     

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

@prymitive prymitive force-pushed the strict branch 6 times, most recently from 77d181e to fdcb74e Compare July 4, 2024 14:58
rulefmt.Parse checks if a rule file will pass Prometheus checks but it's very expensive.
On top of that it does a lot of what we do later on anyway, but without giving us same level of detail.
@prymitive prymitive merged commit 34c9b6c into main Jul 4, 2024
20 checks passed
@prymitive prymitive deleted the strict branch July 4, 2024 15:17
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