pub struct CacheStats {
pub l1_entries: usize,
pub l1_bytes: usize,
pub l1_hits: u64,
pub l1_misses: u64,
pub l2_entries: usize,
pub l2_bytes: usize,
pub l2_hits: u64,
pub l2_misses: u64,
pub uptime: Duration,
}Expand description
Cache statistics
Fields§
§l1_entries: usizeNumber of L1 entries
l1_bytes: usizeL1 cache size in bytes
l1_hits: u64L1 hit count
l1_misses: u64L1 miss count
l2_entries: usizeNumber of L2 entries
l2_bytes: usizeL2 cache size in bytes
l2_hits: u64L2 hit count
l2_misses: u64L2 miss count
uptime: DurationCache uptime
Implementations§
Source§impl CacheStats
impl CacheStats
Sourcepub fn total_bytes(&self) -> usize
pub fn total_bytes(&self) -> usize
Get total cache size
Sourcepub fn total_entries(&self) -> usize
pub fn total_entries(&self) -> usize
Get total entries
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 moreAuto 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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