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§
Source§impl Clone for CacheStats
impl Clone for CacheStats
Source§fn clone(&self) -> CacheStats
fn clone(&self) -> CacheStats
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 CacheStats
impl Debug for CacheStats
Source§impl Default for CacheStats
impl Default for CacheStats
Auto Trait Implementations§
impl Freeze for CacheStats
impl RefUnwindSafe for CacheStats
impl Send for CacheStats
impl Sync for CacheStats
impl Unpin 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