pub struct CacheMetricsSnapshot {
pub hit_rate: f64,
pub miss_rate: f64,
pub total_hits: u64,
pub total_misses: u64,
pub total_evictions: u64,
pub eviction_rate: f64,
pub avg_latency_ns: f64,
}Expand description
Immutable point-in-time snapshot of cache metrics.
Obtained by calling CacheMetrics::snapshot.
Fields§
§hit_rate: f64Fraction of lookups that resulted in a hit: hits / (hits + misses).
miss_rate: f64Fraction of lookups that resulted in a miss: misses / (hits + misses).
total_hits: u64Total cache hits at snapshot time.
total_misses: u64Total cache misses at snapshot time.
total_evictions: u64Total evictions at snapshot time.
eviction_rate: f64Eviction rate: evictions / (hits + misses).
avg_latency_ns: f64Average lookup latency in nanoseconds.
Implementations§
Trait Implementations§
Source§impl Clone for CacheMetricsSnapshot
impl Clone for CacheMetricsSnapshot
Source§fn clone(&self) -> CacheMetricsSnapshot
fn clone(&self) -> CacheMetricsSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CacheMetricsSnapshot
impl RefUnwindSafe for CacheMetricsSnapshot
impl Send for CacheMetricsSnapshot
impl Sync for CacheMetricsSnapshot
impl Unpin for CacheMetricsSnapshot
impl UnsafeUnpin for CacheMetricsSnapshot
impl UnwindSafe for CacheMetricsSnapshot
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