pub struct DetailedCacheStats {
pub hits: u64,
pub misses: u64,
pub invalidations: u64,
pub size_bytes: u64,
pub entry_count: usize,
pub avg_retrieval_time_ms: f64,
pub avg_store_time_ms: f64,
pub total_operation_time_ms: f64,
pub last_operation_time: Option<SystemTime>,
pub created_at: SystemTime,
}Expand description
Detailed cache statistics with performance metrics
Fields§
§hits: u64Total number of cache hits
misses: u64Total number of cache misses
invalidations: u64Total number of cache invalidations
size_bytes: u64Current cache size in bytes
entry_count: usizeNumber of entries in cache
avg_retrieval_time_ms: f64Average time to retrieve from cache (milliseconds)
avg_store_time_ms: f64Average time to store in cache (milliseconds)
total_operation_time_ms: f64Total time spent on cache operations (milliseconds)
last_operation_time: Option<SystemTime>Timestamp of last cache operation
created_at: SystemTimeTimestamp of cache creation
Implementations§
Source§impl DetailedCacheStats
impl DetailedCacheStats
Sourcepub fn invalidation_rate(&self) -> f64
pub fn invalidation_rate(&self) -> f64
Calculate invalidation rate (invalidations per total operations)
Sourcepub fn efficiency_score(&self) -> f64
pub fn efficiency_score(&self) -> f64
Get cache efficiency score (0.0 to 100.0) Higher is better: considers hit rate and invalidation rate
Trait Implementations§
Source§impl Clone for DetailedCacheStats
impl Clone for DetailedCacheStats
Source§fn clone(&self) -> DetailedCacheStats
fn clone(&self) -> DetailedCacheStats
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 DetailedCacheStats
impl Debug for DetailedCacheStats
Source§impl<'de> Deserialize<'de> for DetailedCacheStats
impl<'de> Deserialize<'de> for DetailedCacheStats
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DetailedCacheStats
impl RefUnwindSafe for DetailedCacheStats
impl Send for DetailedCacheStats
impl Sync for DetailedCacheStats
impl Unpin for DetailedCacheStats
impl UnwindSafe for DetailedCacheStats
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