pub struct ExpertCacheStats {
pub calls: u64,
pub active: u64,
pub missing: u64,
pub fetched: u64,
}Expand description
Running counters, for /metrics and for deciding whether the cache
is sized right.
Fields§
§calls: u64ensure calls.
active: u64Distinct experts routed to, summed over calls.
missing: u64Distinct misses, summed over calls, before any cap.
fetched: u64Misses actually fetched, summed over calls.
Implementations§
Source§impl ExpertCacheStats
impl ExpertCacheStats
Sourcepub fn miss_rate(&self) -> f64
pub fn miss_rate(&self) -> f64
Fraction of routed experts that were not resident. The number that says whether the cache is big enough.
Sourcepub fn fetch_rate(&self) -> f64
pub fn fetch_rate(&self) -> f64
Fraction of misses served over the link rather than by the CPU.
The number that says what the q* split actually did.
pub fn active_per_call(&self) -> f64
Sourcepub fn missing_per_call(&self) -> f64
pub fn missing_per_call(&self) -> f64
Misses per call, before the cap. Quoted beside
active_per_call because the pair is
what sizes a link budget: missing_per_call * bytes_per_expert
is what one step wants to move.
Sourcepub fn fetched_per_call(&self) -> f64
pub fn fetched_per_call(&self) -> f64
Misses per call that actually crossed the link. Under the q*
split this is the one the link sees; missing_per_call minus
this is what the CPU absorbed.
Trait Implementations§
Source§impl Clone for ExpertCacheStats
impl Clone for ExpertCacheStats
Source§fn clone(&self) -> ExpertCacheStats
fn clone(&self) -> ExpertCacheStats
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ExpertCacheStats
Source§impl Debug for ExpertCacheStats
impl Debug for ExpertCacheStats
Source§impl Default for ExpertCacheStats
impl Default for ExpertCacheStats
Source§fn default() -> ExpertCacheStats
fn default() -> ExpertCacheStats
impl Eq for ExpertCacheStats
Source§impl PartialEq for ExpertCacheStats
impl PartialEq for ExpertCacheStats
impl StructuralPartialEq for ExpertCacheStats
Auto Trait Implementations§
impl Freeze for ExpertCacheStats
impl RefUnwindSafe for ExpertCacheStats
impl Send for ExpertCacheStats
impl Sync for ExpertCacheStats
impl Unpin for ExpertCacheStats
impl UnsafeUnpin for ExpertCacheStats
impl UnwindSafe for ExpertCacheStats
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
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> ⓘ
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> ⓘ
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