[−][src]Struct hotmic::snapshot::SimpleSnapshot
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]
fn default() -> SimpleSnapshot
[src]
Auto Trait Implementations
impl Send for SimpleSnapshot
impl Sync for SimpleSnapshot
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.