pub struct CompareOptions {
pub baseline_mean: Option<Duration>,
pub threshold: Threshold,
pub min_samples: u64,
pub allow_cv_noise_band: bool,
}Expand description
Options for BenchmarkResult::compare_with_options.
Defaults: no baseline, percent threshold of 10%, min_samples = 1,
allow_cv_noise_band = true.
§Example
use dev_bench::{CompareOptions, Threshold};
use std::time::Duration;
let opts = CompareOptions {
baseline_mean: Some(Duration::from_nanos(1000)),
threshold: Threshold::regression_pct(20.0),
min_samples: 30,
allow_cv_noise_band: true,
};
assert_eq!(opts.min_samples, 30);Fields§
§baseline_mean: Option<Duration>Baseline mean to compare against. None -> verdict is Skip.
threshold: ThresholdRegression threshold to apply.
min_samples: u64Minimum sample count required before a comparison can be made.
Below this, the verdict is Skip with a min_samples detail.
allow_cv_noise_band: boolIf true, regressions within baseline_ns * cv are downgraded
from Fail to Warn.
Trait Implementations§
Source§impl Clone for CompareOptions
impl Clone for CompareOptions
Source§fn clone(&self) -> CompareOptions
fn clone(&self) -> CompareOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompareOptions
impl Debug for CompareOptions
Auto Trait Implementations§
impl Freeze for CompareOptions
impl RefUnwindSafe for CompareOptions
impl Send for CompareOptions
impl Sync for CompareOptions
impl Unpin for CompareOptions
impl UnsafeUnpin for CompareOptions
impl UnwindSafe for CompareOptions
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