pub struct ProcessSampler { /* private fields */ }Expand description
Reads the process’ CPU and memory use. CPU use is a rate: each
ProcessSampler::sample reports the CPU time since the previous one
over the wall time between them (the first reports none).
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 Freeze 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