pub struct Metric { /* private fields */ }Implementations§
Source§impl Metric
impl Metric
pub fn new(name: impl Into<SmallStr>) -> Self
pub fn is_empty(&self) -> bool
pub fn update_count(&self) -> usize
pub fn generation(&self) -> usize
pub fn set_generation(&mut self, generation: usize)
pub fn dtype(&self) -> DataType
pub fn add_tag(&mut self, tag: TagType)
pub fn clear_values(&mut self)
pub fn stats<'a>(&'a self) -> Option<MetricView<'a, f32>>
pub fn times<'a>(&'a self) -> Option<MetricView<'a, Duration>>
pub fn distributions<'a>(&'a self) -> Option<MetricView<'a, f32>>
pub fn upsert<'a>(self, update: impl Into<MetricUpdate<'a>>) -> Self
pub fn update_from(&mut self, other: Metric)
pub fn apply_update<'a>(&mut self, update: impl Into<MetricUpdate<'a>>)
pub fn clear_samples(&mut self)
pub fn statistic(&self) -> &Statistic
pub fn name(&self) -> &SmallStr
pub fn last_value(&self) -> f32
pub fn count(&self) -> u32
pub fn mean(&self) -> f32
pub fn var(&self) -> f32
pub fn stddev(&self) -> f32
pub fn skew(&self) -> f32
pub fn kurt(&self) -> f32
pub fn min(&self) -> f32
pub fn max(&self) -> f32
pub fn sum(&self) -> f32
pub fn quantile(&self, q: f32) -> Option<f32>
Trait Implementations§
Source§impl<'a> ProjectExpr<'a> for &Metric
impl<'a> ProjectExpr<'a> for &Metric
Source§impl<'a> ProjectExpr<'a> for Metric
impl<'a> ProjectExpr<'a> for Metric
impl StructuralPartialEq for Metric
Auto Trait Implementations§
impl Freeze for Metric
impl RefUnwindSafe for Metric
impl Send for Metric
impl Sync for Metric
impl Unpin for Metric
impl UnsafeUnpin for Metric
impl UnwindSafe for Metric
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