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
Source§fn clone(&self) -> CpuUsageSampler
fn clone(&self) -> CpuUsageSampler
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CpuUsageSampler
Source§impl Debug for CpuUsageSampler
impl Debug for CpuUsageSampler
Source§impl Default for CpuUsageSampler
impl Default for CpuUsageSampler
Source§fn default() -> CpuUsageSampler
fn default() -> CpuUsageSampler
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze 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