State: There's still a lot to do, but Calliper should be usable now. Note that I plan to break API prior to 1.0.0 arbitrarily in minor versions.
Table of contents
Usage
To use Calliper, you must have Valgrind installed.
To write your first benchmark with Calliper, add the following to your Cargo.toml
:
[]
= "0.1.4"
[[]]
= "my_first_calliper_benchmark"
= false
Then, create a file at $PROJECT/benches/my_first_calliper_benchmark.rs
with the following contents:
use black_box;
use ;
Now the benchmark can be executed with cargo bench
.
More sophisticated examples can be found in benches folder of this repository.
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
Acknowledgements
Calliper is inspired by Iai benchmarking harness.