pub struct CacheStatsSnapshot {Show 13 fields
pub hits: u64,
pub misses: u64,
pub evictions: u64,
pub bytes_saved: u64,
pub bytes_written: u64,
pub bytes_evicted: u64,
pub read_operations: u64,
pub write_operations: u64,
pub delete_operations: u64,
pub hit_rate: f64,
pub miss_rate: f64,
pub total_operations: u64,
pub uptime_seconds: u64,
}Expand description
Snapshot of cache statistics at a point in time
Fields§
§hits: u64Total cache hits
misses: u64Total cache misses
evictions: u64Total cache evictions
bytes_saved: u64Total bytes saved by cache hits
bytes_written: u64Total bytes written to cache
bytes_evicted: u64Total bytes evicted from cache
read_operations: u64Total read operations
write_operations: u64Total write operations
delete_operations: u64Total delete operations
hit_rate: f64Cache hit rate as a percentage (0.0 to 100.0)
miss_rate: f64Cache miss rate as a percentage (0.0 to 100.0)
total_operations: u64Total cache operations (hits + misses)
uptime_seconds: u64Cache uptime in seconds
Implementations§
Source§impl CacheStatsSnapshot
impl CacheStatsSnapshot
Sourcepub fn format_bytes(bytes: u64) -> String
pub fn format_bytes(bytes: u64) -> String
Format bytes as human-readable string (KB, MB, GB)
Sourcepub fn format_uptime(&self) -> String
pub fn format_uptime(&self) -> String
Format duration as human-readable string
Trait Implementations§
Source§impl Clone for CacheStatsSnapshot
impl Clone for CacheStatsSnapshot
Source§fn clone(&self) -> CacheStatsSnapshot
fn clone(&self) -> CacheStatsSnapshot
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 CacheStatsSnapshot
impl Debug for CacheStatsSnapshot
Source§impl<'de> Deserialize<'de> for CacheStatsSnapshot
impl<'de> Deserialize<'de> for CacheStatsSnapshot
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
Source§impl Display for CacheStatsSnapshot
impl Display for CacheStatsSnapshot
Auto Trait Implementations§
impl Freeze for CacheStatsSnapshot
impl RefUnwindSafe for CacheStatsSnapshot
impl Send for CacheStatsSnapshot
impl Sync for CacheStatsSnapshot
impl Unpin for CacheStatsSnapshot
impl UnwindSafe for CacheStatsSnapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.