pub struct CacheStats {
pub total_requests: u64,
pub hits: u64,
pub misses: u64,
pub expired: u64,
pub hit_rate: f64,
pub cached_entries: u64,
pub weighted_size: u64,
}Expand description
Cache performance statistics
Fields§
§total_requests: u64Total number of cache requests
hits: u64Number of cache hits
misses: u64Number of cache misses
expired: u64Number of expired entries removed
hit_rate: f64Cache hit rate as a percentage
cached_entries: u64Current number of cached entries
weighted_size: u64Total weighted size of cache
Implementations§
Source§impl CacheStats
impl CacheStats
Sourcepub fn format_summary(&self) -> String
pub fn format_summary(&self) -> String
Format statistics for display
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<'de> Deserialize<'de> for CacheStats
impl<'de> Deserialize<'de> for CacheStats
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 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