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

Add benchmark tests based on golden files #40

Merged
merged 1 commit into from
May 13, 2024

Conversation

dirkschumacher
Copy link
Contributor

@dirkschumacher dirkschumacher commented May 13, 2024

This adds a set of benchmark tests for all golden files. This allows us to quickly run some benchmarks that cover quite a bit of code. Of course that does not replace running longer on bigger instances, but it's a nice middle ground I hope.

to run them

go test -benchmem -run=^$ -count 10 -bench ^Benchmark ./... > old.txt
# make changes to code
go test -benchmem -run=^$ -count 10 -bench ^Benchmark ./... > new.txt 
benchstat old.txt new.txt

Copy link
Member

@merschformann merschformann left a comment

Choose a reason for hiding this comment

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

Nice. I'd love to automate this. 🤔

@dirkschumacher dirkschumacher force-pushed the ds/chore/bench-golden branch from 069067f to ca91a67 Compare May 13, 2024 11:02
@dirkschumacher dirkschumacher merged commit 3b4926e into develop May 13, 2024
7 checks passed
@dirkschumacher dirkschumacher deleted the ds/chore/bench-golden branch May 13, 2024 11:04
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.

3 participants