[][src]Struct tempest::metric::Metrics

pub struct Metrics {
    pub names: Vec<String>,
    pub labels: Option<Vec<(String, String)>>,
    pub bucket: Bucket,
}

Fields

names: Vec<String>

Names parts joined together with backend delimiters

labels: Option<Vec<(String, String)>>

Labels

bucket: Bucket

Storage for our metric instances

Methods

impl Metrics[src]

pub fn new(names: Vec<&str>) -> Self[src]

pub fn named(&mut self, names: Vec<&str>) -> Self[src]

pub fn labels(&mut self, labels: Vec<(&str, &str)>) -> Self[src]

pub fn add_label(&mut self, key: &str, value: &str)[src]

pub fn flush(&mut self)[src]

pub fn counter(&mut self, names: Vec<&str>, value: isize)[src]

pub fn incr(&mut self, names: Vec<&str>)[src]

pub fn decr(&mut self, names: Vec<&str>)[src]

pub fn gauge(&mut self, names: Vec<&str>, value: isize)[src]

pub fn counter_labels(
    &mut self,
    names: Vec<&str>,
    value: isize,
    labels: Vec<(&str, &str)>
)
[src]

pub fn incr_labels(&mut self, names: Vec<&str>, labels: Vec<(&str, &str)>)[src]

pub fn decr_labels(&mut self, names: Vec<&str>, labels: Vec<(&str, &str)>)[src]

pub fn gauge_labels(
    &mut self,
    names: Vec<&str>,
    value: isize,
    labels: Vec<(&str, &str)>
)
[src]

pub fn timer(&mut self) -> SimpleTimer[src]

pub fn time(&mut self, names: Vec<&str>, timer: SimpleTimer)[src]

pub fn time_labels(
    &mut self,
    names: Vec<&str>,
    timer: SimpleTimer,
    labels: Vec<(&str, &str)>
)
[src]

Trait Implementations

impl Default for Metrics[src]

impl Clone for Metrics[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Metrics

impl Unpin for Metrics

impl Sync for Metrics

impl UnwindSafe for Metrics

impl RefUnwindSafe for Metrics

Blanket Implementations

impl<T> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Erased for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,