Simplified stable-compatible benchmark runner.
Almost all user code will only be interested in Bencher
and the
macros that are used to describe benchmarker functions and
the benchmark runner.
WARNING: There's no proper black_box yet in this stable port of the benchmark runner, only a workaround implementation. It may not work correctly and may have too large overhead.
One way to use this crate is to use it as dev-dependency and setup
cargo to compile a file in benches/
that runs without the testing harness.
In Cargo.toml:
[[bench]]
name = "example"
harness = false
In benches/example.rs:
extern crate bencher;
use Bencher;
benchmark_group!;
benchmark_main!;
#
#
Use cargo bench
as usual. A command line argument can be used to filter
which benchmarks to run.