pub struct CpuUsageSampler { /* private fields */ }Expand description
Stateful sampler that converts cumulative CPU time into a per-interval percentage.
The sampler stores exactly one previous reading; it never allocates and never polls in the background. The caller decides how often to sample.
Implementations§
Trait Implementations§
Source§impl Clone for CpuUsageSampler
impl Clone for CpuUsageSampler
impl Copy for CpuUsageSampler
Source§impl Debug for CpuUsageSampler
impl Debug for CpuUsageSampler
Auto Trait Implementations§
impl Forget for CpuUsageSampler
impl Freeze for CpuUsageSampler
impl Move for CpuUsageSampler
impl RefUnwindSafe for CpuUsageSampler
impl Send for CpuUsageSampler
impl Sync for CpuUsageSampler
impl Unpin for CpuUsageSampler
impl UnsafeUnpin for CpuUsageSampler
impl UnwindSafe for CpuUsageSampler
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