pub struct PooledStats {
pub mean: f64,
pub harmonic_mean: f64,
pub min: f64,
pub max: f64,
pub p1: f64,
pub p5: f64,
pub p10: f64,
pub median: f64,
pub std_dev: f64,
pub count: usize,
}Expand description
The full distribution of a per-frame metric series.
All fields are 0.0/0 for an empty input. Percentiles are
linearly interpolated; std_dev is the population standard deviation.
Fields§
§mean: f64Arithmetic mean.
harmonic_mean: f64Harmonic mean over the positive values (0.0 if none are positive).
min: f64Smallest value.
max: f64Largest value.
p1: f641st percentile.
p5: f645th percentile.
p10: f6410th percentile.
median: f64Median (50th percentile).
std_dev: f64Population standard deviation.
count: usizeNumber of frames pooled.
Implementations§
Source§impl PooledStats
impl PooledStats
Sourcepub fn from_values(values: &[f64]) -> Self
pub fn from_values(values: &[f64]) -> Self
Compute every summary statistic from a per-frame series in one pass over a sort.
Sourcepub fn get(&self, strategy: PoolStrategy) -> f64
pub fn get(&self, strategy: PoolStrategy) -> f64
Read back the value a given PoolStrategy would produce.
Trait Implementations§
Source§impl Clone for PooledStats
impl Clone for PooledStats
Source§fn clone(&self) -> PooledStats
fn clone(&self) -> PooledStats
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 PooledStats
Source§impl Debug for PooledStats
impl Debug for PooledStats
Source§impl Default for PooledStats
impl Default for PooledStats
Source§fn default() -> PooledStats
fn default() -> PooledStats
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PooledStatswhere
PooledStats: Default,
impl<'de> Deserialize<'de> for PooledStatswhere
PooledStats: Default,
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 PooledStats
impl PartialEq for PooledStats
Source§fn eq(&self, other: &PooledStats) -> bool
fn eq(&self, other: &PooledStats) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PooledStats
impl Serialize for PooledStats
impl StructuralPartialEq for PooledStats
Auto Trait Implementations§
impl Freeze for PooledStats
impl RefUnwindSafe for PooledStats
impl Send for PooledStats
impl Sync for PooledStats
impl Unpin for PooledStats
impl UnsafeUnpin for PooledStats
impl UnwindSafe for PooledStats
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