pub struct BenchmarkConfig {
pub name: String,
pub warmup_iterations: usize,
pub iterations: usize,
}Expand description
Configuration for a benchmark run.
Fields§
§name: StringName for this benchmark.
warmup_iterations: usizeNumber of warmup iterations (discarded).
iterations: usizeNumber of measured iterations.
Implementations§
Source§impl BenchmarkConfig
impl BenchmarkConfig
Sourcepub fn new(name: impl Into<String>) -> Self
pub fn new(name: impl Into<String>) -> Self
Create a new benchmark configuration with the given name.
Sourcepub fn warmup_iterations(self, n: usize) -> Self
pub fn warmup_iterations(self, n: usize) -> Self
Set the number of warmup iterations.
Sourcepub fn iterations(self, n: usize) -> Self
pub fn iterations(self, n: usize) -> Self
Set the number of measured iterations.
Trait Implementations§
Source§impl Clone for BenchmarkConfig
impl Clone for BenchmarkConfig
Source§fn clone(&self) -> BenchmarkConfig
fn clone(&self) -> BenchmarkConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BenchmarkConfig
impl RefUnwindSafe for BenchmarkConfig
impl Send for BenchmarkConfig
impl Sync for BenchmarkConfig
impl Unpin for BenchmarkConfig
impl UnwindSafe for BenchmarkConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).