pub struct MetricStore { /* private fields */ }Expand description
Central store for all incoming metrics, organized by ID.
Implementations§
Source§impl MetricStore
impl MetricStore
Sourcepub fn get_average(&self, id: &MetricId) -> f32
pub fn get_average(&self, id: &MetricId) -> f32
Returns the average value for a metric, or 0.0 if not found.
Sourcepub fn get_trend(&self, id: &MetricId) -> f32
pub fn get_trend(&self, id: &MetricId) -> f32
Returns the trend for a metric, or 0.0 if not found.
Sourcepub fn get_variance(&self, id: &MetricId) -> f32
pub fn get_variance(&self, id: &MetricId) -> f32
Returns the variance for a metric, or 0.0 if not found.
High variance in frame times is a strong stutter indicator.
Sourcepub fn get_max(&self, id: &MetricId) -> f32
pub fn get_max(&self, id: &MetricId) -> f32
Returns the maximum value for a metric, or 0.0 if not found.
Sourcepub fn get_min(&self, id: &MetricId) -> f32
pub fn get_min(&self, id: &MetricId) -> f32
Returns the minimum value for a metric, or 0.0 if not found.
Sourcepub fn get_sample_count(&self, id: &MetricId) -> usize
pub fn get_sample_count(&self, id: &MetricId) -> usize
Returns the sample count for a metric, or 0 if not found.
Trait Implementations§
Source§impl Debug for MetricStore
impl Debug for MetricStore
Source§impl Default for MetricStore
impl Default for MetricStore
Source§fn default() -> MetricStore
fn default() -> MetricStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MetricStore
impl RefUnwindSafe for MetricStore
impl Send for MetricStore
impl Sync for MetricStore
impl Unpin for MetricStore
impl UnwindSafe for MetricStore
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