[][src]Struct metrix::instruments::Meter

pub struct Meter { /* fields omitted */ }

For measuring rates, e.g. request/s

This meter count occurrences. An occurrence with values is counted as 1 occurrence.

To get rates on values use instruments::other_instruments::ValueMeter

Methods

impl Meter[src]

pub fn new<T: Into<String>>(name: T) -> Meter[src]

pub fn new_with_defaults<T: Into<String>>(name: T) -> Meter[src]

pub fn get_name(&self) -> &str[src]

pub fn set_name<T: Into<String>>(&mut self, name: T)[src]

pub fn name<T: Into<String>>(self, name: T) -> Self[src]

pub fn set_title<T: Into<String>>(&mut self, title: T)[src]

pub fn title<T: Into<String>>(self, title: T) -> Self[src]

pub fn set_description<T: Into<String>>(&mut self, description: T)[src]

pub fn description<T: Into<String>>(self, description: T) -> Self[src]

pub fn set_lower_cutoff(&mut self, cutoff: f64)[src]

Rates below this value will be shown as zero.

Default is 0.001

pub fn lower_cutoff(self, cutoff: f64) -> Self[src]

Rates below this value will be shown as zero.

Default is 0.001

pub fn set_one_minute_rate_enabled(&mut self, enabled: bool)[src]

Enable tracking of one minute rates.

Default: enabled

pub fn one_minute_rate_enabled(self, enabled: bool) -> Self[src]

Enable tracking of one minute rates.

Default: enabled

pub fn set_five_minute_rate_enabled(&mut self, enabled: bool)[src]

Enable tracking of five minute rates.

Default: disabled

pub fn five_minute_rate_enabled(self, enabled: bool) -> Self[src]

Enable tracking of five minute rates.

Default: disabled

pub fn set_fifteen_minute_rate_enabled(&mut self, enabled: bool)[src]

Enable tracking of one minute rates.

Default: disabled

pub fn fifteen_minute_rate_enabled(self, enabled: bool) -> Self[src]

Enable tracking of one minute rates.

Default: disabled

pub fn accept<L: Eq + Send + 'static, F: Into<LabelFilter<L>>>(
    self,
    accept: F
) -> InstrumentAdapter<L, Self>
[src]

pub fn for_label<L: Eq + Send + 'static>(
    self,
    label: L
) -> InstrumentAdapter<L, Self>
[src]

Creates an InstrumentAdapter that makes this instrument react on observations on the given label.

pub fn for_labels<L: Eq + Send + 'static>(
    self,
    labels: Vec<L>
) -> InstrumentAdapter<L, Self>
[src]

Creates an InstrumentAdapter that makes this instrument react on observations with the given labels.

If labels is empty the instrument will not react to any observations

pub fn for_all_labels<L: Eq + Send + 'static>(
    self
) -> InstrumentAdapter<L, Self>
[src]

Creates an InstrumentAdapter that makes this instrument react on all observations.

pub fn for_labels_by_predicate<L, P>(
    self,
    label_predicate: P
) -> InstrumentAdapter<L, Self> where
    L: Eq + Send + 'static,
    P: Fn(&L) -> bool + Send + 'static, 
[src]

Creates an InstrumentAdapter that makes this instrument react on observations with labels specified by the predicate.

pub fn adapter<L: Eq + Send + 'static>(self) -> InstrumentAdapter<L, Self>[src]

Creates an InstrumentAdapter that makes this instrument to no observations.

Trait Implementations

impl Descriptive for Meter[src]

impl Instrument for Meter[src]

impl PutsSnapshot for Meter[src]

impl Updates for Meter[src]

Auto Trait Implementations

impl !RefUnwindSafe for Meter

impl Send for Meter

impl !Sync for Meter

impl Unpin for Meter

impl UnwindSafe for Meter

Blanket Implementations

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

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

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

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

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

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<V, T> VZip<V> for T where
    V: MultiLane<T>,