diff --git a/pages/common/cargo-bench.md b/pages/common/cargo-bench.md new file mode 100644 index 0000000000..1540bc6352 --- /dev/null +++ b/pages/common/cargo-bench.md @@ -0,0 +1,36 @@ +# cargo bench + +> Compile and execute benchmarks. +> More information: . + +- Execute all benchmarks of a package: + +`cargo bench` + +- Compile, but don’t run benchmarks: + +`cargo bench --no-run` + +- Benchmark only the specified packages: + +`cargo bench --package {{package}}` + +- Benchmark the specified benchmark: + +`cargo bench --bench {{benchmark}}` + +- Benchmark with the given profile (default: `bench`): + +`cargo bench --profile {{profile}}` + +- Benchmark all example targets: + +`cargo bench --examples` + +- Benchmark all binary targets: + +`cargo bench --bins` + +- Benchmark the package’s library: + +`cargo bench --lib`