Struct bma_benchmark::Benchmark
source · [−]pub struct Benchmark { /* private fields */ }Expand description
Simple benchmark or a stage
Implementations
sourceimpl 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 RefUnwindSafe for Benchmark
impl Send for Benchmark
impl Sync for Benchmark
impl Unpin for Benchmark
impl UnwindSafe for Benchmark
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more