pub struct CompareOptions {
pub baseline_ops_per_sec: Option<f64>,
pub ops_drop_pct_threshold: f64,
pub baseline_p99: Option<Duration>,
pub p99_regression_pct_threshold: f64,
}Expand description
Options controlling how a StressResult is compared against a baseline.
Defaults: no baseline; ops/sec drop threshold 10%; p99 regression threshold 20%.
§Example
use dev_stress::CompareOptions;
let opts = CompareOptions {
baseline_ops_per_sec: Some(900_000.0),
ops_drop_pct_threshold: 5.0,
baseline_p99: None,
p99_regression_pct_threshold: 25.0,
};
assert_eq!(opts.ops_drop_pct_threshold, 5.0);Fields§
§baseline_ops_per_sec: Option<f64>Baseline throughput (ops/sec). When Some, the run fails if
ops_per_sec < baseline * (1 - ops_drop_pct_threshold/100).
ops_drop_pct_threshold: f64Maximum allowed drop, as a percent.
baseline_p99: Option<Duration>Baseline p99 latency. When Some AND latency was tracked, the
run fails if p99 > baseline_p99 * (1 + p99_regression_pct_threshold/100).
p99_regression_pct_threshold: f64Maximum allowed p99 regression, as a percent.
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