pub struct LoadThreshold {
pub metric: LoadThresholdMetric,
pub comparator: LoadComparator,
pub threshold: f64,
}Expand description
An in-run pass/fail threshold for a load scenario: a per-run metric compared
against a value. All thresholds must hold for the run verdict to be PASS
(logical AND). Maps to the LoadThreshold schema.
Fields§
§metric: LoadThresholdMetricThe per-run metric to evaluate.
comparator: LoadComparatorHow the observed per-run value is compared to the threshold.
threshold: f64The threshold value (milliseconds for latency metrics, a 0.0-1.0
fraction for ERROR_RATE, requests/second for THROUGHPUT_RPS).
Implementations§
Source§impl LoadThreshold
impl LoadThreshold
Sourcepub fn new(
metric: LoadThresholdMetric,
comparator: LoadComparator,
threshold: f64,
) -> Self
pub fn new( metric: LoadThresholdMetric, comparator: LoadComparator, threshold: f64, ) -> Self
Create a threshold comparing metric to threshold using comparator.
Trait Implementations§
Source§impl Clone for LoadThreshold
impl Clone for LoadThreshold
Source§fn clone(&self) -> LoadThreshold
fn clone(&self) -> LoadThreshold
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 LoadThreshold
impl Debug for LoadThreshold
Source§impl<'de> Deserialize<'de> for LoadThreshold
impl<'de> Deserialize<'de> for LoadThreshold
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
Source§impl PartialEq for LoadThreshold
impl PartialEq for LoadThreshold
Source§fn eq(&self, other: &LoadThreshold) -> bool
fn eq(&self, other: &LoadThreshold) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for LoadThreshold
impl Serialize for LoadThreshold
impl StructuralPartialEq for LoadThreshold
Auto Trait Implementations§
impl Freeze for LoadThreshold
impl RefUnwindSafe for LoadThreshold
impl Send for LoadThreshold
impl Sync for LoadThreshold
impl Unpin for LoadThreshold
impl UnsafeUnpin for LoadThreshold
impl UnwindSafe for LoadThreshold
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