contrib: Add compare-benches tool#30
Merged
Merged
Conversation
When running benchmarks, we are often comparing how changes we've made
will impact subsets of the program. `nanobench` offers an informative
table, but does not compare across commits. This is a tool to compare
`nanobench` results across to commits to catch regressions early or to
prove statements on performance. I have been using this locally, and
decided to generalize it to share.
On approach, this is a Rust binary with 0 dependencies. Rather than
using the `nanobench` JSON output, which would require a JSON parser,
the results are parsed directly from `stdout`. The user can pass the
number of runs they would like to perform for each build, and the
minimum time of these runs is selected. The default directory to build
`bench_bitcoin` is in the top level `build` folder, however the user may
specify a different name. The user is also able to filter on bench
targets using a substring match (i.e. MemPool).
Example usage:
`cargo run --release -- --filter SHA256`
See the `README` for more details.
Member
|
Nice! I think this is fine to add here for now to give people a chance to use it. Longer term, I think we should nuke the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When running benchmarks, we are often comparing how changes we've made will impact subsets of the program.
nanobenchoffers an informative table, but does not compare across commits. This is a tool to comparenanobenchresults across to commits to catch regressions early or to prove statements on performance. I have been using this locally, and decided to generalize it to share.On approach, this is a Rust binary with 0 dependencies. Rather than using the
nanobenchJSON output, which would require a JSON parser, the results are parsed directly fromstdout. The user can pass the number of runs they would like to perform for each build, and the minimum time of these runs is selected. The default directory to buildbench_bitcoinis in the top levelbuildfolder, however the user may specify a different name. The user is also able to filter on bench targets using a substring match (i.e. MemPool).Example usage:
cargo run --release -- --filter SHA256See the
READMEfor more details.