Skip to content

Benchmark fixes#7765

Merged
anderseknert merged 1 commit intoopen-policy-agent:mainfrom
anderseknert:benchmark-fixes
Jul 11, 2025
Merged

Benchmark fixes#7765
anderseknert merged 1 commit intoopen-policy-agent:mainfrom
anderseknert:benchmark-fixes

Conversation

@anderseknert
Copy link
Copy Markdown
Member

@anderseknert anderseknert commented Jul 11, 2025

A number of benchmarks did not have a for range b.N (or equivalent) loop in them, leading to nothing being measured. This PR fixes that, along with some cleanups in benchmarks found along the way.

Also remove b.StopTimer calls where not absolutely necessary, as that is notoriously buggy, and had some benchmarks hang for a very long time.

A number of benchmarks did not have a `for range b.N` (or equivalent) loop in
them, leading to nothing being measured. This PR fixes that, along with some
cleanups in benchmarks found along the way.

Also remove `b.StopTimer` where not absolutely necessary, as that is
[notoriously buggy](golang/go#27217), and had some
benchmarks hang for a very long time.

Signed-off-by: Anders Eknert <anders@styra.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 11, 2025

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit 6a53c89
🔍 Latest deploy log https://app.netlify.com/projects/openpolicyagent/deploys/6870efa3f508a40007e67d7a
😎 Deploy Preview https://deploy-preview-7765--openpolicyagent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
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.

Thanks!

@anderseknert anderseknert merged commit e61e638 into open-policy-agent:main Jul 11, 2025
31 checks passed
@anderseknert anderseknert deleted the benchmark-fixes branch July 11, 2025 11: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