mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-24 22:15:26 +02:00
cargo-bench: add page (#10771)
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
This commit is contained in:
parent
96fec4b355
commit
9134b02bc7
1 changed files with 36 additions and 0 deletions
36
pages/common/cargo-bench.md
Normal file
36
pages/common/cargo-bench.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
# cargo bench
|
||||
|
||||
> Compile and execute benchmarks.
|
||||
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-bench.html>.
|
||||
|
||||
- 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`
|
Loading…
Add table
Reference in a new issue