pub struct CacheStats {
pub l1_enabled: bool,
pub l2_enabled: bool,
pub write_through: bool,
pub promote_to_l1: bool,
pub l1_hits: u64,
pub l2_hits: u64,
pub misses: u64,
pub promotions: u64,
}Expand description
Cache statistics.
The boolean fields reflect configuration; the u64 counters are live
running totals of get outcomes.
Fields§
§l1_enabled: bool§l2_enabled: bool§write_through: bool§promote_to_l1: bool§l1_hits: u64Number of get calls served from L1.
l2_hits: u64Number of get calls served from L2 (after an L1 miss).
misses: u64Number of get calls that found nothing in either tier.
promotions: u64Number of L2 hits successfully copied back into L1.
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 (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 CacheStats
impl RefUnwindSafe for CacheStats
impl Send for CacheStats
impl Sync for CacheStats
impl Unpin for CacheStats
impl UnsafeUnpin 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