pub struct ProcessStats {
pub cpu_time_user: Duration,
pub cpu_time_kernel: Duration,
pub memory_usage_bytes: u64,
}Expand description
Holds the retrieved basic statistics about the running process.
Fields§
§cpu_time_user: DurationHow much time this process has spent executing in user mode since it was started
cpu_time_kernel: DurationHow much time this process has spent executing in kernel mode since it was started
memory_usage_bytes: u64Size of the “resident” memory the process has allocated, in bytes.
Implementations§
Source§impl ProcessStats
impl ProcessStats
Sourcepub fn get() -> Result<ProcessStats, Error>
pub fn get() -> Result<ProcessStats, Error>
Get the statistics using the OS-specific method.
Trait Implementations§
Source§impl Clone for ProcessStats
impl Clone for ProcessStats
Source§fn clone(&self) -> ProcessStats
fn clone(&self) -> ProcessStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProcessStats
impl Debug for ProcessStats
Source§impl Hash for ProcessStats
impl Hash for ProcessStats
Source§impl PartialEq for ProcessStats
impl PartialEq for ProcessStats
impl Copy for ProcessStats
impl Eq for ProcessStats
impl StructuralPartialEq for ProcessStats
Auto Trait Implementations§
impl Freeze for ProcessStats
impl RefUnwindSafe for ProcessStats
impl Send for ProcessStats
impl Sync for ProcessStats
impl Unpin for ProcessStats
impl UnwindSafe for ProcessStats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more