Skip to content

Commit 41f3edc

Browse files
committed
CONTRIBUTING: explain how to do benchmarking with a baseline
1 parent 40b3310 commit 41f3edc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: src/tools/miri/CONTRIBUTING.md

+9
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,15 @@ Miri comes with a few benchmarks; you can run `./miri bench` to run them with th
212212
Miri. Note: this will run `./miri install` as a side-effect. Also requires `hyperfine` to be
213213
installed (`cargo install hyperfine`).
214214

215+
To compare the benchmark results with a baseline, do the following:
216+
- Before applying your changes, run `./miri bench --save-baseline=baseline.json`.
217+
- Then do your changes.
218+
- Then run `./miri bench --load-baseline=baseline.json`; the results will include
219+
a comparison with the baseline.
220+
221+
You can run only some of the benchmarks by listing them, e.g. `./miri bench mse`.
222+
The names refer to the folders in `bench-cargo-miri`.
223+
215224
## Configuring `rust-analyzer`
216225

217226
To configure `rust-analyzer` and the IDE for working on Miri, copy one of the provided

0 commit comments

Comments
 (0)