pub struct RateMeter<K> { /* private fields */ }Expand description
Turns cumulative CPU times into rates: the fraction of one core used since the previous round (1.0 = one core fully busy).
Each round, call RateMeter::sample for every key still alive, then
RateMeter::finish; keys not sampled in a round are forgotten, so a PID
reused by a new process (a new key) starts fresh.
Implementations§
Source§impl<K: Eq + Hash + Clone> RateMeter<K>
impl<K: Eq + Hash + Clone> RateMeter<K>
Trait Implementations§
Auto Trait Implementations§
impl<K> Freeze for RateMeter<K>
impl<K> RefUnwindSafe for RateMeter<K>where
K: RefUnwindSafe,
impl<K> Send for RateMeter<K>where
K: Send,
impl<K> Sync for RateMeter<K>where
K: Sync,
impl<K> Unpin for RateMeter<K>where
K: Unpin,
impl<K> UnsafeUnpin for RateMeter<K>
impl<K> UnwindSafe for RateMeter<K>where
K: UnwindSafe,
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