pub struct Benchmarker { /* private fields */ }Expand description
Quick benchmarker
Implementations§
Source§impl Benchmarker
impl Benchmarker
Sourcepub fn with_warmup(self, warmup: usize) -> Self
pub fn with_warmup(self, warmup: usize) -> Self
Set warmup iterations
Sourcepub fn with_iterations(self, iterations: usize) -> Self
pub fn with_iterations(self, iterations: usize) -> Self
Set benchmark iterations
Sourcepub fn bench<F>(
&mut self,
name: impl Into<String>,
f: F,
) -> Result<BenchmarkResult>
pub fn bench<F>( &mut self, name: impl Into<String>, f: F, ) -> Result<BenchmarkResult>
Benchmark a function
Sourcepub fn results(&self) -> &[BenchmarkResult]
pub fn results(&self) -> &[BenchmarkResult]
Get all results
Sourcepub fn export_json(&self) -> Result<String>
pub fn export_json(&self) -> Result<String>
Export results as JSON
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Benchmarker
impl RefUnwindSafe for Benchmarker
impl Send for Benchmarker
impl Sync for Benchmarker
impl Unpin for Benchmarker
impl UnsafeUnpin for Benchmarker
impl UnwindSafe for Benchmarker
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