pub struct CacheStatsTracker { /* private fields */ }Expand description
Thread-safe cache statistics tracker
Implementations§
Source§impl CacheStatsTracker
impl CacheStatsTracker
Sourcepub fn record_hit(&self, retrieval_time_ms: f64)
pub fn record_hit(&self, retrieval_time_ms: f64)
Record a cache hit with timing
Sourcepub fn record_miss(&self)
pub fn record_miss(&self)
Record a cache miss
Sourcepub fn record_store(&self, store_time_ms: f64, size_bytes: u64)
pub fn record_store(&self, store_time_ms: f64, size_bytes: u64)
Record a cache store operation with timing
Sourcepub fn record_invalidation(&self)
pub fn record_invalidation(&self)
Record a cache invalidation
Sourcepub fn set_entry_count(&self, count: usize)
pub fn set_entry_count(&self, count: usize)
Update entry count
Sourcepub fn get_stats(&self) -> Option<DetailedCacheStats>
pub fn get_stats(&self) -> Option<DetailedCacheStats>
Get current statistics
Trait Implementations§
Source§impl Clone for CacheStatsTracker
impl Clone for CacheStatsTracker
Source§fn clone(&self) -> CacheStatsTracker
fn clone(&self) -> CacheStatsTracker
Returns a duplicate of the value. Read more
1.0.0 · 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 CacheStatsTracker
impl Debug for CacheStatsTracker
Auto Trait Implementations§
impl Freeze for CacheStatsTracker
impl RefUnwindSafe for CacheStatsTracker
impl Send for CacheStatsTracker
impl Sync for CacheStatsTracker
impl Unpin for CacheStatsTracker
impl UnwindSafe for CacheStatsTracker
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