Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,20 @@ Divan `0.1.21` requires Rust `1.80.0` or later.

See [`#[divan::bench]`][bench_attr] for info on benchmark function registration.

## Checking benchmarks in CI

If you want to run each benchmarked function only once (to check that they don't panic without measuring their performance), you can run the benchmark runner crate with the `--test` parameter. You can do so by running either

```sh
cargo bench -- --test
```

or

```sh
cargo test --benches
```

## Examples

Practical example benchmarks can be found in the [`examples/benches`](https://github.com/nvzqz/divan/tree/main/examples/benches)
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ pub use crate::{alloc::AllocProfiler, benchmark::Bencher, divan::Divan};
/// ```
///
/// See [`#[divan::bench]`](macro@bench) for more examples.
///
/// To get more options for running benchmarks, see [`Divan`] type.
pub fn main() {
Divan::from_args().main();
}
Expand Down