pub struct ProcessSampler { /* private fields */ }Expand description
Reads the process’ CPU and memory use. CPU use is a rate: the CPU time
over the wall time since the newest earlier sample at least
CPU_WINDOW old (the oldest one until then), whenever and however
often it is sampled; none until a quarter of a second has passed.
Implementations§
Source§impl ProcessSampler
impl ProcessSampler
Sourcepub fn new() -> ProcessSampler
pub fn new() -> ProcessSampler
A sampler with no reading yet.
Sourcepub fn sample(&mut self) -> ProcessSample
pub fn sample(&mut self) -> ProcessSample
The process’ CPU and memory use now (GPU use is the platform’s to add).
Trait Implementations§
Source§impl Debug for ProcessSampler
impl Debug for ProcessSampler
Auto Trait Implementations§
impl Forget for ProcessSampler
impl Freeze for ProcessSampler
impl Move for ProcessSampler
impl RefUnwindSafe for ProcessSampler
impl Send for ProcessSampler
impl Sync for ProcessSampler
impl Unpin for ProcessSampler
impl UnsafeUnpin for ProcessSampler
impl UnwindSafe for ProcessSampler
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