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

eval: don't build trace message when tracing disabled #7165

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

anderseknert
Copy link
Member

@anderseknert anderseknert commented Nov 10, 2024

Running regal lint on Regal's own policies, this accounts for ~1.4 million allocations 😵

Before

BenchmarkRegalLintingItself-10    1	3314104416 ns/op	6720813824 B/op	128361292 allocs/op

After

BenchmarkRegalLintingItself-10    1	3185755333 ns/op	6684952216 B/op	126912887 allocs/op

Running `regal lint` on Regal's own policies, this accounts for nearly
2 million allocations 😵

**Before**
```
BenchmarkRegalLintingItself-10    	       1	3314104416 ns/op	6720813824 B/op	128361292 allocs/op
```

**After**
```
BenchmarkRegalLintingItself-10    	       1	3185755333 ns/op	6684952216 B/op	126912887 allocs/op
```

Signed-off-by: Anders Eknert <[email protected]>
Copy link
Contributor

@srenatus srenatus left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@anderseknert anderseknert merged commit e507c41 into open-policy-agent:main Nov 10, 2024
28 checks passed
@anderseknert anderseknert deleted the eval-fix-sb-alloc branch November 10, 2024 14: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.

2 participants