Expand description

Thin wrapper crate around the Criterion benchmark suite.

In order to facilitate micro-benchmarking Rust code on Fuchsia while at the same time providing a pleasant experience locally, this crate provides a wrapper type FuchsiaCriterion that implements Deref<Target = Criterion> with two constructors.

By default, calling FuchsiaCriterion::default will create a [Criterion] object whose output is saved to a command-line-provided JSON file in the Fuchsiaperf file format.

In order to benchmark locally, i.e. in an fx shell, simply pass --args=local_bench='true' to the fx set command which will create a CMD-configurable Criterion object that is useful for fine-tuning performance.

fn main() {
    let mut _c = FuchsiaCriterion::default();
}

Re-exports

pub use criterion;

Structs

Thin wrapper around [Criterion].