pub struct CacheStats {
pub hits: u64,
pub misses: u64,
pub writes: u64,
pub deletes: u64,
pub errors: u64,
pub hit_rate: f64,
pub avg_hit_time: Duration,
pub avg_miss_time: Duration,
pub avg_write_time: Duration,
pub uptime: Duration,
pub entries: usize,
pub memory_bytes: Option<usize>,
}Expand description
A snapshot of cache statistics.
Fields§
§hits: u64Number of cache hits.
misses: u64Number of cache misses.
writes: u64Number of write operations.
deletes: u64Number of delete operations.
errors: u64Number of errors.
hit_rate: f64Hit rate (0.0 - 1.0).
avg_hit_time: DurationAverage time for cache hits.
avg_miss_time: DurationAverage time for cache misses.
avg_write_time: DurationAverage time for writes.
uptime: DurationTime since cache was created.
entries: usizeNumber of entries in cache.
memory_bytes: Option<usize>Memory usage in bytes (if available).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Forget for CacheStats
impl Freeze for CacheStats
impl Move 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