From 9134b02bc77823a65d2f6aefc83e67b602a8699c Mon Sep 17 00:00:00 2001 From: Sunil Thunga <76161837+Cioraz@users.noreply.github.com> Date: Mon, 2 Oct 2023 18:33:19 +0530 Subject: [PATCH] cargo-bench: add page (#10771) Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> --- pages/common/cargo-bench.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pages/common/cargo-bench.md 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`