pub struct PerformanceThreshold {
pub name: String,
pub max: Option<f64>,
pub min: Option<f64>,
pub max_mean: Option<f64>,
pub max_p95: Option<f64>,
pub max_p99: Option<f64>,
}Expand description
Performance threshold for assertions
Fields§
§name: StringMetric name
max: Option<f64>Maximum allowed value
min: Option<f64>Minimum allowed value
max_mean: Option<f64>Maximum allowed mean
max_p95: Option<f64>Maximum allowed p95
max_p99: Option<f64>Maximum allowed p99
Implementations§
Source§impl PerformanceThreshold
impl PerformanceThreshold
Sourcepub const fn with_max_mean(self, max_mean: f64) -> Self
pub const fn with_max_mean(self, max_mean: f64) -> Self
Set maximum mean
Sourcepub const fn with_max_p95(self, max_p95: f64) -> Self
pub const fn with_max_p95(self, max_p95: f64) -> Self
Set maximum p95
Sourcepub const fn with_max_p99(self, max_p99: f64) -> Self
pub const fn with_max_p99(self, max_p99: f64) -> Self
Set maximum p99
Sourcepub fn check(&self, stats: &MetricStats) -> ProbarResult<()>
pub fn check(&self, stats: &MetricStats) -> ProbarResult<()>
Check if stats pass this threshold
Trait Implementations§
Source§impl Clone for PerformanceThreshold
impl Clone for PerformanceThreshold
Source§fn clone(&self) -> PerformanceThreshold
fn clone(&self) -> PerformanceThreshold
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 moreSource§impl Debug for PerformanceThreshold
impl Debug for PerformanceThreshold
Source§impl<'de> Deserialize<'de> for PerformanceThreshold
impl<'de> Deserialize<'de> for PerformanceThreshold
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PerformanceThreshold
impl RefUnwindSafe for PerformanceThreshold
impl Send for PerformanceThreshold
impl Sync for PerformanceThreshold
impl Unpin for PerformanceThreshold
impl UnsafeUnpin for PerformanceThreshold
impl UnwindSafe for PerformanceThreshold
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