pub struct BenchmarkRunner { /* private fields */ }Expand description
Benchmark runner
Implementations§
Source§impl BenchmarkRunner
impl BenchmarkRunner
Sourcepub fn target_time(self, d: Duration) -> Self
pub fn target_time(self, d: Duration) -> Self
Set target time
Sourcepub fn bench<F>(&self, name: &str, f: F) -> BenchmarkResultwhere
F: FnMut(),
pub fn bench<F>(&self, name: &str, f: F) -> BenchmarkResultwhere
F: FnMut(),
Run a benchmark
Sourcepub fn bench_throughput<F>(
&self,
name: &str,
bytes_per_iter: usize,
f: F,
) -> BenchmarkResultwhere
F: FnMut(),
pub fn bench_throughput<F>(
&self,
name: &str,
bytes_per_iter: usize,
f: F,
) -> BenchmarkResultwhere
F: FnMut(),
Run a benchmark with throughput measured in bytes
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BenchmarkRunner
impl RefUnwindSafe for BenchmarkRunner
impl Send for BenchmarkRunner
impl Sync for BenchmarkRunner
impl Unpin for BenchmarkRunner
impl UnsafeUnpin for BenchmarkRunner
impl UnwindSafe for BenchmarkRunner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more