pub struct BaselineComparison {
pub matched: bool,
pub stale_reasons: Vec<String>,
pub baseline_units: u64,
pub current_units: u64,
pub delta_units: i64,
pub delta_pct: f64,
}Expand description
The result of comparing a current run to a baseline.
Fields§
§matched: boolWhether the fingerprints matched (a non-stale comparison).
stale_reasons: Vec<String>Reasons the baseline is stale (empty when matched).
baseline_units: u64CU recorded in the baseline.
current_units: u64CU measured in the current run.
delta_units: i64Signed delta (current - baseline).
delta_pct: f64Percentage delta relative to the baseline.
Implementations§
Source§impl BaselineComparison
impl BaselineComparison
Sourcepub fn compute(
baseline_units: u64,
baseline_fp: &Fingerprint,
current: &Measurement,
current_fp: &Fingerprint,
) -> Self
pub fn compute( baseline_units: u64, baseline_fp: &Fingerprint, current: &Measurement, current_fp: &Fingerprint, ) -> Self
Compute a comparison from a baseline figure + fingerprint and the current measurement + fingerprint.
Trait Implementations§
Source§impl Clone for BaselineComparison
impl Clone for BaselineComparison
Source§fn clone(&self) -> BaselineComparison
fn clone(&self) -> BaselineComparison
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 BaselineComparison
impl Debug for BaselineComparison
Source§impl<'de> Deserialize<'de> for BaselineComparison
impl<'de> Deserialize<'de> for BaselineComparison
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 BaselineComparison
impl PartialEq for BaselineComparison
Source§fn eq(&self, other: &BaselineComparison) -> bool
fn eq(&self, other: &BaselineComparison) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BaselineComparison
impl Serialize for BaselineComparison
impl StructuralPartialEq for BaselineComparison
Auto Trait Implementations§
impl Freeze for BaselineComparison
impl RefUnwindSafe for BaselineComparison
impl Send for BaselineComparison
impl Sync for BaselineComparison
impl Unpin for BaselineComparison
impl UnsafeUnpin for BaselineComparison
impl UnwindSafe for BaselineComparison
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