pub struct MeasureConfig {
pub warmup_ns: u64,
pub measurement_ns: u64,
pub sample_count: usize,
pub fixed_iters_per_sample: Option<u64>,
pub min_iterations: Option<u64>,
pub max_iterations: Option<u64>,
pub track_allocations: bool,
}Expand description
Config for one benchmark measurement.
Fields§
§warmup_ns: u64Warmup budget in nanoseconds. Fixed mode skips warmup.
measurement_ns: u64Measurement budget in nanoseconds. It sets the iterations per sample.
sample_count: usizeSamples to collect. Values below MIN_SAMPLE_COUNT rise to it.
fixed_iters_per_sample: Option<u64>Fixed iterations per sample. Some selects fixed mode: no warmup, no estimate.
min_iterations: Option<u64>Minimum total measurement iterations. Ignored in fixed mode.
max_iterations: Option<u64>Maximum total measurement iterations. Ignored in fixed mode.
track_allocations: boolRead the allocation counters around each timed region.
Implementations§
Source§impl MeasureConfig
impl MeasureConfig
Sourcepub fn normalized(self) -> Self
pub fn normalized(self) -> Self
Raise the sample count to MIN_SAMPLE_COUNT and a fixed count of 0 to 1.
Trait Implementations§
Source§impl Clone for MeasureConfig
impl Clone for MeasureConfig
impl Copy for MeasureConfig
Source§impl Debug for MeasureConfig
impl Debug for MeasureConfig
Source§impl Default for MeasureConfig
impl Default for MeasureConfig
impl Eq for MeasureConfig
Source§impl From<&BenchmarkConfig> for MeasureConfig
impl From<&BenchmarkConfig> for MeasureConfig
Source§fn from(config: &BenchmarkConfig) -> Self
fn from(config: &BenchmarkConfig) -> Self
Converts to this type from the input type.
Source§impl PartialEq for MeasureConfig
impl PartialEq for MeasureConfig
impl StructuralPartialEq for MeasureConfig
Auto Trait Implementations§
impl Freeze for MeasureConfig
impl RefUnwindSafe for MeasureConfig
impl Send for MeasureConfig
impl Sync for MeasureConfig
impl Unpin for MeasureConfig
impl UnsafeUnpin for MeasureConfig
impl UnwindSafe for MeasureConfig
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.