about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-12-22 20:48:45 +0100
committerRalf Jung <post@ralfj.de>2024-12-22 20:48:45 +0100
commit41f3edc2af43e41671e51228d68eb37b661b6d8b (patch)
tree8b110b6e2b7e076306e504e9376b9f6ede3e6dc6
parent40b33102800612447ea5dc92ae7d6692b9a53e32 (diff)
downloadrust-41f3edc2af43e41671e51228d68eb37b661b6d8b.tar.gz
rust-41f3edc2af43e41671e51228d68eb37b661b6d8b.zip
CONTRIBUTING: explain how to do benchmarking with a baseline
-rw-r--r--src/tools/miri/CONTRIBUTING.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tools/miri/CONTRIBUTING.md b/src/tools/miri/CONTRIBUTING.md
index e97f4bf86d8..dd283b7c0a8 100644
--- a/src/tools/miri/CONTRIBUTING.md
+++ b/src/tools/miri/CONTRIBUTING.md
@@ -212,6 +212,15 @@ Miri comes with a few benchmarks; you can run `./miri bench` to run them with th
 Miri. Note: this will run `./miri install` as a side-effect. Also requires `hyperfine` to be
 installed (`cargo install hyperfine`).
 
+To compare the benchmark results with a baseline, do the following:
+- Before applying your changes, run `./miri bench --save-baseline=baseline.json`.
+- Then do your changes.
+- Then run `./miri bench --load-baseline=baseline.json`; the results will include
+  a comparison with the baseline.
+
+You can run only some of the benchmarks by listing them, e.g. `./miri bench mse`.
+The names refer to the folders in `bench-cargo-miri`.
+
 ## Configuring `rust-analyzer`
 
 To configure `rust-analyzer` and the IDE for working on Miri, copy one of the provided