Struct test::Bencher
[−]
[src]
pub struct Bencher {
pub bytes: u64,
// some fields omitted
}Unstable (
test)Manager of the benchmarking runs.
This is fed 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: u64
Unstable (
test)Methods
impl Bencher[src]
fn iter<T, F>(&mut self, inner: F) where F: FnMut() -> T
Unstable (
test)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<F>(&mut self, n: u64, f: F) where F: FnOnce(&mut Bencher)
fn auto_bench<F>(&mut self, f: F) -> Summary where F: FnMut(&mut Bencher)
Trait Implementations
Derived Implementations
impl Clone for Bencher[src]
fn clone(&self) -> Bencher
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more