Statistics-driven microbenchmarking in Rust
open sourceMIT OR Apache-2.0free
Criterion.rs is a statistics-driven microbenchmarking library for Rust, a port of Haskell's criterion. Benchmarks run on stable Rust through cargo bench; it collects and stores statistical information from run to run, and its analysis reports whether and by how much performance changed since the last run, so regressions and optimizations are measured reliably. It writes HTML reports with charts, through gnuplot or the plotters crate. Active development moved from the bheisler/criterion.rs repository to the criterion-rs organization, which publishes the criterion crate.
Problems it solves
- find out whether my change made this Rust function slower
- benchmark Rust code on stable without nightly's test::Bencher
- catch small performance regressions in a Rust library before release
- compare two implementations of a Rust function with reliable statistics
Features
- statistical detection of performance changes between runs
- works on stable Rust with cargo bench
- HTML reports with charts
- gnuplot or plotters chart backends
