pub struct Benchmark { /* private fields */ }Expand description
Simple benchmark or a stage
Implementations§
Source§impl Benchmark
impl Benchmark
Sourcepub fn new(iterations: u32) -> Self
pub fn new(iterations: u32) -> Self
Create simple benchmark with pre-defined number of iterations
Sourcepub fn finish(&mut self, iterations: Option<u32>, errors: Option<u32>)
pub fn finish(&mut self, iterations: Option<u32>, errors: Option<u32>)
Finish a simple benchmark, specifying number of iterations made
Sourcepub fn print(&self, iterations: Option<u32>, errors: Option<u32>)
pub fn print(&self, iterations: Option<u32>, errors: Option<u32>)
Print a simple benchmark result, specifying number of iterations made
Sourcepub fn result0(&self) -> BenchmarkResult
pub fn result0(&self) -> BenchmarkResult
Get a benchmark result
Sourcepub fn result(
&self,
iterations: Option<u32>,
errors: Option<u32>,
) -> BenchmarkResult
pub fn result( &self, iterations: Option<u32>, errors: Option<u32>, ) -> BenchmarkResult
Get a benchmark result, specifying number of iterations made
Sourcepub fn increment(&mut self)
pub fn increment(&mut self)
Increment iterations inside benchmark
Not required to use if the number of iterations is specified at benchmark creation or finish / print
Sourcepub fn increment_errors(&mut self)
pub fn increment_errors(&mut self)
Increment errors inside benchmark
Not required to use if the number of errors is specified at benchmark finish / print
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Benchmark
impl RefUnwindSafe for Benchmark
impl Send for Benchmark
impl Sync for Benchmark
impl Unpin for Benchmark
impl UnwindSafe for Benchmark
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