pub struct EtaStats {
pub expansions: u64,
pub reductions: u64,
pub failed_expansions: u64,
pub failed_reductions: u64,
}Expand description
Counts eta-expansion and reduction events for instrumentation.
Fields§
§expansions: u64§reductions: u64§failed_expansions: u64§failed_reductions: u64Implementations§
Source§impl EtaStats
impl EtaStats
Sourcepub fn record_expansion(&mut self)
pub fn record_expansion(&mut self)
Record a successful expansion.
Sourcepub fn record_reduction(&mut self)
pub fn record_reduction(&mut self)
Record a successful reduction.
Sourcepub fn record_failed_expansion(&mut self)
pub fn record_failed_expansion(&mut self)
Record a failed expansion.
Sourcepub fn record_failed_reduction(&mut self)
pub fn record_failed_reduction(&mut self)
Record a failed reduction.
Sourcepub fn expansion_rate(&self) -> f64
pub fn expansion_rate(&self) -> f64
Return expansion success rate.
Sourcepub fn reduction_rate(&self) -> f64
pub fn reduction_rate(&self) -> f64
Return reduction success rate.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EtaStats
impl RefUnwindSafe for EtaStats
impl Send for EtaStats
impl Sync for EtaStats
impl Unpin for EtaStats
impl UnsafeUnpin for EtaStats
impl UnwindSafe for EtaStats
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