pub struct SwitchCounters {
pub voluntary: u64,
pub involuntary: u64,
}Expand description
Counters describing how much the OS interfered with a thread.
An involuntary context switch means the scheduler took the CPU away mid-computation: the single most common cause of a benchmark outlier that has nothing to do with the core being measured.
Fields§
§voluntary: u64§involuntary: u64Implementations§
Source§impl SwitchCounters
impl SwitchCounters
Sourcepub fn delta(self, earlier: SwitchCounters) -> SwitchCounters
pub fn delta(self, earlier: SwitchCounters) -> SwitchCounters
Counters accumulated between two samples.
Trait Implementations§
Source§impl Clone for SwitchCounters
impl Clone for SwitchCounters
impl Copy for SwitchCounters
Source§impl Debug for SwitchCounters
impl Debug for SwitchCounters
Source§impl Default for SwitchCounters
impl Default for SwitchCounters
impl Eq for SwitchCounters
Source§impl PartialEq for SwitchCounters
impl PartialEq for SwitchCounters
impl StructuralPartialEq for SwitchCounters
Auto Trait Implementations§
impl Freeze for SwitchCounters
impl RefUnwindSafe for SwitchCounters
impl Send for SwitchCounters
impl Sync for SwitchCounters
impl Unpin for SwitchCounters
impl UnsafeUnpin for SwitchCounters
impl UnwindSafe for SwitchCounters
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