pub struct SampleStats {
pub count: u32,
pub min: u64,
pub median: u64,
pub max: u64,
pub variance: f64,
pub std_dev: f64,
pub cv: f64,
}Expand description
Distribution of total_cu across multiple measurement samples.
Only present when a scenario was run more than once on a non-deterministic
backend (Scenario::samples > 1); the recorded backend is deterministic, so it
never produces this — the tool never fabricates a spread it did not observe.
Fields§
§count: u32Number of samples taken.
min: u64Smallest observed total_cu.
median: u64Median observed total_cu.
max: u64Largest observed total_cu.
variance: f64Population variance of total_cu.
std_dev: f64Standard deviation of total_cu (sqrt(variance)).
cv: f64Coefficient of variation (std_dev / mean); 0.0 when the mean is 0.
Implementations§
Source§impl SampleStats
impl SampleStats
Sourcepub fn from_samples(totals: &[u64]) -> Option<Self>
pub fn from_samples(totals: &[u64]) -> Option<Self>
Compute statistics over the per-sample total_cu values, or None for
fewer than two samples (a single run has no distribution).
Trait Implementations§
Source§impl Clone for SampleStats
impl Clone for SampleStats
Source§fn clone(&self) -> SampleStats
fn clone(&self) -> SampleStats
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 moreimpl Copy for SampleStats
Source§impl Debug for SampleStats
impl Debug for SampleStats
Source§impl<'de> Deserialize<'de> for SampleStats
impl<'de> Deserialize<'de> for SampleStats
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 SampleStats
impl PartialEq for SampleStats
Source§fn eq(&self, other: &SampleStats) -> bool
fn eq(&self, other: &SampleStats) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SampleStats
impl Serialize for SampleStats
impl StructuralPartialEq for SampleStats
Auto Trait Implementations§
impl Freeze for SampleStats
impl RefUnwindSafe for SampleStats
impl Send for SampleStats
impl Sync for SampleStats
impl Unpin for SampleStats
impl UnsafeUnpin for SampleStats
impl UnwindSafe for SampleStats
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