Struct tango_bench::MeasurementSettings
source · pub struct MeasurementSettings {
pub filter_outliers: bool,
pub samples_per_haystack: usize,
pub min_iterations_per_sample: usize,
pub max_iterations_per_sample: usize,
pub sampler_type: SamplerType,
pub cache_firewall: Option<usize>,
pub yield_before_sample: bool,
}Expand description
Describes basic settings for the benchmarking process
This structure is passed to cli::run().
Should be created only with overriding needed properties, like so:
use tango_bench::MeasurementSettings;
let settings = MeasurementSettings {
min_iterations_per_sample: 1000,
..Default::default()
};Fields§
§filter_outliers: bool§samples_per_haystack: usizeThe number of samples per one generated haystack
min_iterations_per_sample: usizeMinimum number of iterations in a sample for each of 2 tested functions
max_iterations_per_sample: usizeThe number of iterations in a sample for each of 2 tested functions
sampler_type: SamplerType§cache_firewall: Option<usize>Size of a CPU cache firewall in KBytes
If set, the scheduler will perform a dummy data read between samples generation to spoil the CPU cache
Cache firewall is a way to reduce the impact of the CPU cache on the benchmarking process. It tries to minimize discrepancies in performance between two algorithms due to the CPU cache state.
yield_before_sample: boolIf true, scheduler will perform a yield of control back to the OS before taking each sample
Yielding control to the OS is a way to reduce the impact of OS scheduler on the benchmarking process.
Trait Implementations§
source§impl Clone for MeasurementSettings
impl Clone for MeasurementSettings
source§fn clone(&self) -> MeasurementSettings
fn clone(&self) -> MeasurementSettings
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for MeasurementSettings
impl Debug for MeasurementSettings
source§impl Default for MeasurementSettings
impl Default for MeasurementSettings
impl Copy for MeasurementSettings
Auto Trait Implementations§
impl RefUnwindSafe for MeasurementSettings
impl Send for MeasurementSettings
impl Sync for MeasurementSettings
impl Unpin for MeasurementSettings
impl UnwindSafe for MeasurementSettings
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
source§impl<T> Colorize for Twhere
T: ?Sized,
impl<T> Colorize for Twhere
T: ?Sized,
source§fn into_style(self) -> StyledValue<Self>where
Self: Sized,
fn into_style(self) -> StyledValue<Self>where
Self: Sized,
StyledValuesource§fn style(&self) -> StyledValue<&Self>
fn style(&self) -> StyledValue<&Self>
StyledValuesource§fn into_style_with<F, B, U>(
self,
style: Style<F, B, U>
) -> StyledValue<Self, F, B, U>where
Self: Sized,
fn into_style_with<F, B, U>(
self,
style: Style<F, B, U>
) -> StyledValue<Self, F, B, U>where
Self: Sized,
StyledValue and applies the given stylesource§fn style_with<F, B, U>(
&self,
style: Style<F, B, U>
) -> StyledValue<&Self, F, B, U>
fn style_with<F, B, U>( &self, style: Style<F, B, U> ) -> StyledValue<&Self, F, B, U>
StyledValue and applies the given style