pub struct Metric { /* private fields */ }Implementations§
Source§impl Metric
impl Metric
pub fn new(name: &'static str) -> Self
pub fn update_count(&self) -> usize
pub fn version(&self) -> u64
pub fn set_version(&mut self, version: u64)
pub fn dtype(&self) -> DataType
pub fn with_tag(self, tag: TagType) -> Self
pub fn add_tag(&mut self, tag: TagType)
pub fn contains_tag(&self, tag: &TagType) -> bool
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 statistic(&self) -> &Statistic
pub fn name(&self) -> &str
pub fn last_value(&self) -> f32
pub fn count(&self) -> i32
pub fn mean(&self) -> f32
pub fn var(&self) -> f32
pub fn stddev(&self) -> f32
pub fn skew(&self) -> f32
pub fn min(&self) -> f32
pub fn max(&self) -> f32
pub fn sum(&self) -> f32
Trait Implementations§
Source§impl From<Metric> for MetricSetUpdate<'_>
impl From<Metric> for MetricSetUpdate<'_>
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