pub struct Metrics { /* private fields */ }Expand description
Metrics for observability and monitoring.
All counters are atomically updated and can be read from any thread.
Use snapshot() to get a consistent point-in-time view.
Implementations§
Source§impl Metrics
impl Metrics
Sourcepub fn record_publish(&self)
pub fn record_publish(&self)
Record a published message.
Sourcepub fn record_consume(&self)
pub fn record_consume(&self)
Record a consumed message.
Sourcepub fn record_overrun(&self)
pub fn record_overrun(&self)
Record an overrun event.
Sourcepub fn record_backpressure(&self)
pub fn record_backpressure(&self)
Record a backpressure event (producer blocked on credits).
Sourcepub fn snapshot(&self) -> MetricsSnapshot
pub fn snapshot(&self) -> MetricsSnapshot
Get a consistent snapshot of all metrics.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnsafeUnpin for Metrics
impl UnwindSafe for Metrics
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