forked from diasurgical/DevilutionX
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
benchmarking.md: Explain how to compare benchmarks
- Loading branch information
Showing
2 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,3 +32,34 @@ tools/linux_reduced_cpu_variance_run.sh build-reld/clx_render_benchmark | |
See `tools/build_and_run_benchmark.py --help` for more information. | ||
|
||
You can also [profile](profiling-linux.md) your benchmarks. | ||
|
||
|
||
## Comparing benchmark runs | ||
|
||
You can use [compare.py from Google Benchmark](https://github.com/google/benchmark/blob/main/docs/tools.md) to compare 2 benchmarks. | ||
|
||
First, install the tool: | ||
|
||
```bash | ||
git clone [email protected]:google/benchmark.git ~/google-benchmark | ||
cd ~/google-benchmark/tools | ||
pip3 install -r requirements.txt | ||
cd - | ||
``` | ||
|
||
Then, build the 2 binaries that you'd like to compare. For example: | ||
|
||
```bash | ||
BASELINE=master | ||
BENCHMARK=dun_render_benchmark | ||
|
||
git checkout "$BASELINE" | ||
tools/build_and_run_benchmark.py -B "build-reld-${BASELINE}" --no-run "$BENCHMARK" | ||
git checkout - | ||
|
||
tools/build_and_run_benchmark.py --no-run "$BENCHMARK" | ||
|
||
tools/linux_reduced_cpu_variance_run.sh ~/google-benchmark/tools/compare.py -a benchmarks \ | ||
"build-reld-${BASELINE}/${BENCHMARK}" "build-reld/${BENCHMARK}" \ | ||
--benchmark_repetitions=10 | ||
``` |
This file contains 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