pub struct CacheStats {
pub l1_hits: u64,
pub l1_misses: u64,
pub l2_hits: u64,
pub l2_misses: u64,
pub l3_hits: u64,
pub l3_misses: u64,
pub branch_mispredictions: u64,
pub tlb_misses: u64,
}Expand description
Comprehensive cache performance statistics
Fields§
§l1_hits: u64§l1_misses: u64§l2_hits: u64§l2_misses: u64§l3_hits: u64§l3_misses: u64§branch_mispredictions: u64§tlb_misses: u64Implementations§
Source§impl CacheStats
impl CacheStats
Sourcepub fn l1_hit_rate(&self) -> f64
pub fn l1_hit_rate(&self) -> f64
Calculate L1 cache hit rate
Sourcepub fn l2_hit_rate(&self) -> f64
pub fn l2_hit_rate(&self) -> f64
Calculate L2 cache hit rate
Sourcepub fn l3_hit_rate(&self) -> f64
pub fn l3_hit_rate(&self) -> f64
Calculate L3 cache hit rate
Sourcepub fn efficiency_score(&self) -> f64
pub fn efficiency_score(&self) -> f64
Calculate overall cache efficiency score
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