pub struct CacheStats { /* private fields */ }Expand description
Statistics for cache operations.
All counters are atomic and can be safely accessed from multiple threads.
Implementations§
Source§impl CacheStats
impl CacheStats
Sourcepub fn record_set(&self)
pub fn record_set(&self)
Record a snapshot set operation.
Sourcepub fn record_hit(&self)
pub fn record_hit(&self)
Record a snapshot hit.
Sourcepub fn record_miss(&self)
pub fn record_miss(&self)
Record a snapshot miss.
Sourcepub fn record_clear(&self)
pub fn record_clear(&self)
Record a snapshot clear.
Sourcepub fn record_notifications(&self, count: u64)
pub fn record_notifications(&self, count: u64)
Record notifications sent.
Sourcepub fn snapshots_set(&self) -> u64
pub fn snapshots_set(&self) -> u64
Get total snapshots set.
Sourcepub fn snapshot_hits(&self) -> u64
pub fn snapshot_hits(&self) -> u64
Get total snapshot hits.
Sourcepub fn snapshot_misses(&self) -> u64
pub fn snapshot_misses(&self) -> u64
Get total snapshot misses.
Sourcepub fn snapshots_cleared(&self) -> u64
pub fn snapshots_cleared(&self) -> u64
Get total snapshots cleared.
Sourcepub fn notifications_sent(&self) -> u64
pub fn notifications_sent(&self) -> u64
Get total notifications sent.
Trait Implementations§
Source§impl Debug for CacheStats
impl Debug for CacheStats
Source§impl Default for CacheStats
impl Default for CacheStats
Source§fn default() -> CacheStats
fn default() -> CacheStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for CacheStats
impl RefUnwindSafe for CacheStats
impl Send for CacheStats
impl Sync for CacheStats
impl Unpin for CacheStats
impl UnsafeUnpin for CacheStats
impl UnwindSafe for CacheStats
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request