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: Duration
How much time this process has spent executing in user mode since it was started
cpu_time_kernel: Duration
How much time this process has spent executing in kernel mode since it was started
memory_usage_bytes: u64
Size of the “resident” memory the process has allocated, in bytes.
Implementations§
Source§impl ProcessStats
impl ProcessStats
Sourcepub async fn get() -> Result<ProcessStats, Error>
pub async 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 copy 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