[][src]Struct dipstick::AtomicBucket

pub struct AtomicBucket { /* fields omitted */ }

Central aggregation structure. Maintains a list of metrics for enumeration when used as source.

Methods

impl AtomicBucket[src]

pub fn new() -> AtomicBucket[src]

Build a new atomic bucket.

pub fn default_stats<F>(func: F) where
    F: Fn(InputKind, MetricName, ScoreType) -> Option<(InputKind, MetricName, MetricValue)> + Send + Sync + 'static, 
[src]

Set the default aggregated metrics statistics generator.

pub fn unset_default_stats()[src]

Revert the default aggregated metrics statistics generator to the default stats_summary.

pub fn default_drain(default_config: impl Output + Send + Sync + 'static)[src]

Set the default bucket aggregated metrics flush output.

pub fn unset_default_drain()[src]

Revert the default bucket aggregated metrics flush output.

pub fn set_stats<F>(&self, func: F) where
    F: Fn(InputKind, MetricName, ScoreType) -> Option<(InputKind, MetricName, MetricValue)> + Send + Sync + 'static, 
[src]

Deprecated since 0.7.2:

Use stats()

Set this bucket's statistics generator.

pub fn stats<F>(&self, func: F) where
    F: Fn(InputKind, MetricName, ScoreType) -> Option<(InputKind, MetricName, MetricValue)> + Send + Sync + 'static, 
[src]

Set this bucket's statistics generator.

pub fn unset_stats(&self)[src]

Revert this bucket's statistics generator to the default stats.

pub fn set_drain(&self, new_drain: impl Output + Send + Sync + 'static)[src]

Deprecated since 0.7.2:

Use drain()

Set this bucket's aggregated metrics flush output.

pub fn drain(&self, new_drain: impl Output + Send + Sync + 'static)[src]

Set this bucket's aggregated metrics flush output.

pub fn unset_drain(&self)[src]

Revert this bucket's flush target to the default output.

pub fn flush_to(&self, publish_scope: &dyn OutputScope) -> Result<()>[src]

Immediately flush the bucket's metrics to the specified scope and stats.

Trait Implementations

impl Clone for AtomicBucket[src]

impl Debug for AtomicBucket[src]

impl Default for AtomicBucket[src]

impl Flush for AtomicBucket[src]

fn flush(&self) -> Result<()>[src]

Collect and reset aggregated data. Publish statistics

impl<S: AsRef<str>> From<S> for AtomicBucket[src]

impl InputScope for AtomicBucket[src]

fn new_metric(&self, name: MetricName, kind: InputKind) -> InputMetric[src]

Lookup or create scores for the requested metric.

Auto Trait Implementations

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> 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.