pub struct BatchMetrics { /* private fields */ }Expand description
Implementations§
Source§impl BatchMetrics
impl BatchMetrics
Sourcepub fn new(registry: &Registry) -> Result<Self>
pub fn new(registry: &Registry) -> Result<Self>
Register metrics on registry with the default prefix (batch).
Sourcepub fn with_prefix(registry: &Registry, prefix: &str) -> Result<Self>
pub fn with_prefix(registry: &Registry, prefix: &str) -> Result<Self>
Register metrics on registry with a custom prefix.
Metric names follow the pattern {prefix}_{metric_name}.
Sourcepub fn recorder(&self, batcher_name: &str) -> BatchMetricsRecorder
pub fn recorder(&self, batcher_name: &str) -> BatchMetricsRecorder
Create a BatchMetricsRecorder for a specific batcher instance.
The batcher_name is used as the value for the batcher label on all metrics.
Trait Implementations§
Source§impl Clone for BatchMetrics
impl Clone for BatchMetrics
Source§fn clone(&self) -> BatchMetrics
fn clone(&self) -> BatchMetrics
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BatchMetrics
impl Debug for BatchMetrics
Source§impl MetricsRecorderFactory for BatchMetrics
impl MetricsRecorderFactory for BatchMetrics
Source§fn create_recorder(&self, batcher_name: &str) -> Box<dyn MetricsRecorder>
fn create_recorder(&self, batcher_name: &str) -> Box<dyn MetricsRecorder>
Create a
MetricsRecorder for the given batcher name.Auto Trait Implementations§
impl !RefUnwindSafe for BatchMetrics
impl !UnwindSafe for BatchMetrics
impl Freeze for BatchMetrics
impl Send for BatchMetrics
impl Sync for BatchMetrics
impl Unpin for BatchMetrics
impl UnsafeUnpin for BatchMetrics
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more