pub struct CacheStats {
pub parsed_size: usize,
pub optimized_size: usize,
pub parsed_hits: u64,
pub parsed_misses: u64,
pub optimized_hits: u64,
pub optimized_misses: u64,
}Expand description
Cache statistics.
Fields§
§parsed_size: usizeNumber of entries in parsed cache.
optimized_size: usizeNumber of entries in optimized cache.
parsed_hits: u64Number of parsed cache hits.
parsed_misses: u64Number of parsed cache misses.
optimized_hits: u64Number of optimized cache hits.
optimized_misses: u64Number of optimized cache misses.
Implementations§
Source§impl CacheStats
impl CacheStats
Sourcepub fn parsed_hit_rate(&self) -> f64
pub fn parsed_hit_rate(&self) -> f64
Returns the hit rate for parsed cache (0.0 to 1.0).
Sourcepub fn optimized_hit_rate(&self) -> f64
pub fn optimized_hit_rate(&self) -> f64
Returns the hit rate for optimized cache (0.0 to 1.0).
Sourcepub fn total_size(&self) -> usize
pub fn total_size(&self) -> usize
Returns the total cache size.
Sourcepub fn total_hit_rate(&self) -> f64
pub fn total_hit_rate(&self) -> f64
Returns the total hit rate.
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