pub struct ProcessUsage {
pub resident_bytes: u64,
pub footprint_bytes: u64,
pub cpu_seconds: f64,
pub wakeups_total: Option<u64>,
pub disk_ops_total: Option<u64>,
pub disk_read_bytes: Option<u64>,
pub disk_write_bytes: Option<u64>,
}Expand description
One snapshot of the current process’s resource usage.
Fields§
§resident_bytes: u64Resident set (working set on Windows) in bytes.
footprint_bytes: u64Private footprint in bytes: macOS phys_footprint, Windows PrivateUsage.
cpu_seconds: f64Process CPU time (user plus system) since process start, in seconds.
wakeups_total: Option<u64>Thread wake-ups (timer and other interrupts) since process start, when the host reports them.
disk_ops_total: Option<u64>Disk (block or I/O) operations since process start, when the host reports them.
disk_read_bytes: Option<u64>Bytes read from storage since process start, when the host reports them.
disk_write_bytes: Option<u64>Bytes written to storage since process start, when the host reports them.
Implementations§
Source§impl ProcessUsage
impl ProcessUsage
Sourcepub fn rates_since(
&self,
earlier: &ProcessUsage,
elapsed: Duration,
) -> UsageRates
pub fn rates_since( &self, earlier: &ProcessUsage, elapsed: Duration, ) -> UsageRates
Rates of change from earlier (an older snapshot) to self over elapsed.
A zero elapsed yields zero rates rather than dividing by zero.
Trait Implementations§
Source§impl Clone for ProcessUsage
impl Clone for ProcessUsage
impl Copy for ProcessUsage
Source§impl Debug for ProcessUsage
impl Debug for ProcessUsage
Source§impl Default for ProcessUsage
impl Default for ProcessUsage
Source§impl PartialEq for ProcessUsage
impl PartialEq for ProcessUsage
impl StructuralPartialEq for ProcessUsage
Auto Trait Implementations§
impl Freeze for ProcessUsage
impl RefUnwindSafe for ProcessUsage
impl Send for ProcessUsage
impl Sync for ProcessUsage
impl Unpin for ProcessUsage
impl UnsafeUnpin for ProcessUsage
impl UnwindSafe for ProcessUsage
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