[][src]Struct hotmic::snapshot::SimpleSnapshot

pub struct SimpleSnapshot { /* fields omitted */ }

A user-friendly metric snapshot that allows easy retrieval of values.

This is good for programmatic exploration of values, whereas Snapshot is designed around being consumed by output adapters that send metrics to external collection systems.

Methods

impl SimpleSnapshot[src]

pub fn count(&self, key: &str) -> Option<i64>[src]

Gets the counter value for the given metric key.

Returns None if the metric key has no counter value in this snapshot.

pub fn gauge(&self, key: &str) -> Option<u64>[src]

Gets the gauge value for the given metric key.

Returns None if the metric key has no gauge value in this snapshot.

pub fn timing_histogram(&self, key: &str, percentile: f64) -> Option<u64>[src]

Gets the given timing percentile for given metric key.

Returns None if the metric key has no value at the given percentile in this snapshot.

pub fn value_histogram(&self, key: &str, percentile: f64) -> Option<u64>[src]

Gets the given value percentile for the given metric key.

Returns None if the metric key has no value at the given percentile in this snapshot.

Trait Implementations

impl Default for SimpleSnapshot[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Erased for T