[−][src]Struct metrix::instruments::Meter
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 for_label<L: Eq>(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>(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>(self) -> InstrumentAdapter<L, Self>
[src]
Creates an InstrumentAdapter
that makes this instrument react on
all observations.
pub fn adapter<L: Eq>(self) -> InstrumentAdapter<L, Self>
[src]
Creates an InstrumentAdapter
that makes this instrument to no
observations.
Trait Implementations
impl Updates for Meter
[src]
impl Instrument for Meter
[src]
impl Descriptive for Meter
[src]
impl PutsSnapshot for Meter
[src]
fn put_snapshot(&self, into: &mut Snapshot, descriptive: bool)
[src]
Auto Trait Implementations
impl Send for Meter
impl !Sync for Meter
impl Unpin for Meter
impl UnwindSafe for Meter
impl !RefUnwindSafe for Meter
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
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, U> TryInto<U> 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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,