Struct dipstick::AppMetrics [−][src]
pub struct AppMetrics<M> { /* fields omitted */ }
Variations of this should also provide control of the metric recording scope.
Methods
impl<M> AppMetrics<M> where
M: Clone + Send + Sync + 'static,
[src]
impl<M> AppMetrics<M> where
M: Clone + Send + Sync + 'static,
pub fn marker<AS: AsRef<str>>(&self, name: AS) -> AppMarker<M>
[src]
pub fn marker<AS: AsRef<str>>(&self, name: AS) -> AppMarker<M>
Get an event counter of the provided name.
pub fn counter<AS: AsRef<str>>(&self, name: AS) -> AppCounter<M>
[src]
pub fn counter<AS: AsRef<str>>(&self, name: AS) -> AppCounter<M>
Get a counter of the provided name.
pub fn timer<AS: AsRef<str>>(&self, name: AS) -> AppTimer<M>
[src]
pub fn timer<AS: AsRef<str>>(&self, name: AS) -> AppTimer<M>
Get a timer of the provided name.
pub fn gauge<AS: AsRef<str>>(&self, name: AS) -> AppGauge<M>
[src]
pub fn gauge<AS: AsRef<str>>(&self, name: AS) -> AppGauge<M>
Get a gauge of the provided name.
pub fn flush(&self)
[src]
pub fn flush(&self)
Forcefully flush the backing metrics scope. This is usually not required since static metrics use auto flushing scopes. The effect, if any, of this method depends on the selected metrics backend.
pub fn flush_every(&self, period: Duration) -> CancelHandle
[src]
pub fn flush_every(&self, period: Duration) -> CancelHandle
Schedule for the metrics aggregated of buffered by downstream metrics sinks to be sent out at regular intervals.
Trait Implementations
impl<M> From<Chain<M>> for AppMetrics<M>
[src]
impl<M> From<Chain<M>> for AppMetrics<M>
fn from(chain: Chain<M>) -> AppMetrics<M>
[src]
fn from(chain: Chain<M>) -> AppMetrics<M>
Performs the conversion.
impl<M> Debug for AppMetrics<M> where
M: Debug,
[src]
impl<M> Debug for AppMetrics<M> where
M: Debug,
fn fmt(&self, __f: &mut Formatter) -> Result
[src]
fn fmt(&self, __f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<M: Clone> Clone for AppMetrics<M>
[src]
impl<M: Clone> Clone for AppMetrics<M>
fn clone(&self) -> AppMetrics<M>
[src]
fn clone(&self) -> AppMetrics<M>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<M: Send + Sync + Clone + 'static> WithNamespace for AppMetrics<M>
[src]
impl<M: Send + Sync + Clone + 'static> WithNamespace for AppMetrics<M>
fn with_name<IN: Into<Namespace>>(&self, names: IN) -> Self
[src]
fn with_name<IN: Into<Namespace>>(&self, names: IN) -> Self
Join namespace and prepend in newly defined metrics.
fn with_prefix<AS: AsRef<str>>(&self, prefix: AS) -> Self
[src]
fn with_prefix<AS: AsRef<str>>(&self, prefix: AS) -> Self
Insert prefix in newly defined metrics.
fn with_namespace(&self, names: &[&str]) -> Self
[src]
fn with_namespace(&self, names: &[&str]) -> Self
Join namespace and prepend in newly defined metrics.
impl<M: Send + Sync + Clone + 'static> WithCache for AppMetrics<M>
[src]
impl<M: Send + Sync + Clone + 'static> WithCache for AppMetrics<M>
fn with_cache(&self, cache_size: usize) -> Self
[src]
fn with_cache(&self, cache_size: usize) -> Self
Cache metrics to prevent them from being re-defined on every use.
impl<M: Send + Sync + Clone + 'static> WithSamplingRate for AppMetrics<M>
[src]
impl<M: Send + Sync + Clone + 'static> WithSamplingRate for AppMetrics<M>
fn with_sampling_rate(&self, sampling_rate: Rate) -> Self
[src]
fn with_sampling_rate(&self, sampling_rate: Rate) -> Self
Perform random sampling of values according to the specified rate.
impl<M: Send + Sync + Clone + 'static> WithAsyncQueue for AppMetrics<M>
[src]
impl<M: Send + Sync + Clone + 'static> WithAsyncQueue for AppMetrics<M>
fn with_async_queue(&self, queue_size: usize) -> Self
[src]
fn with_async_queue(&self, queue_size: usize) -> Self
Enqueue collected metrics for dispatch on background thread.
Auto Trait Implementations
impl<M> Send for AppMetrics<M>
impl<M> Send for AppMetrics<M>
impl<M> Sync for AppMetrics<M>
impl<M> Sync for AppMetrics<M>