[src]

Struct test::BenchHarness

pub struct BenchHarness {
    bytes: u64,
    // some fields omitted
}

Manager of the benchmarking runs.

This is feed into functions marked with #[bench] to allow for set-up & tear-down before running a piece of code repeatedly via a call to iter.

Fields

bytes

Methods

impl BenchHarness

fn iter<T>(&mut self, inner: || -> T)

Callback for benchmark functions to run in their body.

fn ns_elapsed(&mut self) -> u64

fn ns_per_iter(&mut self) -> u64

fn bench_n(&mut self, n: u64, f: |&mut BenchHarness|)

fn auto_bench(&mut self, f: |&mut BenchHarness|) -> Summary