pub struct Metric { /* private fields */ }
Implementations§
Source§impl Metric
impl Metric
pub fn new(name: &'static str) -> Self
pub fn inner(&self) -> &MetricInner
pub fn labels(&self) -> Option<&HashSet<MetricLabel>>
pub fn with_labels(self, labels: Vec<MetricLabel>) -> Self
pub fn add_label(&mut self, label: MetricLabel)
pub fn upsert<'a>(self, update: impl Into<MetricUpdate<'a>>) -> Self
pub fn apply_update<'a>(&mut self, update: impl Into<MetricUpdate<'a>>)
pub fn last_value(&self) -> f32
pub fn distribution(&self) -> Option<&Distribution>
pub fn statistic(&self) -> Option<&Statistic>
pub fn time_statistic(&self) -> Option<&TimeStatistic>
pub fn last_time(&self) -> Duration
pub fn count(&self) -> i32
Sourcepub fn value_mean(&self) -> Option<f32>
pub fn value_mean(&self) -> Option<f32>
— Get the value statistics —
pub fn value_variance(&self) -> Option<f32>
pub fn value_std_dev(&self) -> Option<f32>
pub fn value_skewness(&self) -> Option<f32>
pub fn value_min(&self) -> Option<f32>
pub fn value_max(&self) -> Option<f32>
pub fn time_variance(&self) -> Option<Duration>
pub fn time_std_dev(&self) -> Option<Duration>
pub fn time_min(&self) -> Option<Duration>
pub fn time_max(&self) -> Option<Duration>
pub fn time_sum(&self) -> Option<Duration>
Sourcepub fn last_sequence(&self) -> Option<&Vec<f32>>
pub fn last_sequence(&self) -> Option<&Vec<f32>>
— Get the distribution statistics —
pub fn distribution_mean(&self) -> Option<f32>
pub fn distribution_variance(&self) -> Option<f32>
pub fn distribution_std_dev(&self) -> Option<f32>
pub fn distribution_skewness(&self) -> Option<f32>
pub fn distribution_kurtosis(&self) -> Option<f32>
pub fn distribution_min(&self) -> Option<f32>
pub fn distribution_max(&self) -> Option<f32>
pub fn distribution_entropy(&self) -> Option<f32>
Trait Implementations§
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 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