pub struct CacheStatsSnapshot {Show 13 fields
pub l1: CacheStatsLevelSnapshot,
pub l2: CacheStatsLevelSnapshot,
pub l3: CacheStatsLevelSnapshot,
pub total_hits: u64,
pub total_misses: u64,
pub total_skips: u64,
pub hit_rate: f64,
pub puts: u64,
pub invalidations: u64,
pub tables_invalidated: u64,
pub clears: u64,
pub size_exceeded: u64,
pub uptime_secs: u64,
}Expand description
Snapshot of all cache statistics
Fields§
§l1: CacheStatsLevelSnapshotL1 cache statistics
l2: CacheStatsLevelSnapshotL2 cache statistics
l3: CacheStatsLevelSnapshotL3 cache statistics
total_hits: u64Total hits across all levels
total_misses: u64Total misses
total_skips: u64Total skips (due to hints)
hit_rate: f64Overall hit rate percentage
puts: u64Total cache puts
invalidations: u64Total invalidation operations
tables_invalidated: u64Total tables invalidated
clears: u64Total cache clears
size_exceeded: u64Requests rejected due to size limits
uptime_secs: u64Uptime in seconds
Implementations§
Source§impl CacheStatsSnapshot
impl CacheStatsSnapshot
Sourcepub fn total_memory_bytes(&self) -> u64
pub fn total_memory_bytes(&self) -> u64
Calculate total memory usage across all levels
Sourcepub fn total_entries(&self) -> u64
pub fn total_entries(&self) -> u64
Calculate total entry count across all levels
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 moreAuto Trait Implementations§
impl Freeze for CacheStatsSnapshot
impl RefUnwindSafe for CacheStatsSnapshot
impl Send for CacheStatsSnapshot
impl Sync for CacheStatsSnapshot
impl Unpin for CacheStatsSnapshot
impl UnsafeUnpin 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more