pub struct CacheStats { /* private fields */ }Expand description
Information regarding the usage of the in-memory cache
Note: these metrics are only collected when the “cache_metrics” feature is enabled
Implementations§
Source§impl CacheStats
impl CacheStats
Sourcepub fn evictions(&self) -> u64
pub fn evictions(&self) -> u64
Number of times that data has been evicted, due to the cache being full
To increase the cache size use Builder::set_cache_size
Sourcepub fn read_hits(&self) -> u64
pub fn read_hits(&self) -> u64
Number of times that unmodified data has been read from the cache
Sourcepub fn read_misses(&self) -> u64
pub fn read_misses(&self) -> u64
Number of times that unmodified data was not in the cache and was read from storage
Sourcepub fn write_hits(&self) -> u64
pub fn write_hits(&self) -> u64
Number of times that data modified in a transaction has been read from the cache
Sourcepub fn write_misses(&self) -> u64
pub fn write_misses(&self) -> u64
Number of times that data modified in a transaction was not in the cache and was read from storage
Sourcepub fn used_bytes(&self) -> usize
pub fn used_bytes(&self) -> usize
Number of bytes in the cache
Trait Implementations§
Auto 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