pub struct Usage(/* private fields */);
Expand description
Output of getrusage
with information about resource usage. Some of the fields
may be unused in some platforms, and will be always zeroed out. See their manuals
for details.
Implementations§
source§impl Usage
impl Usage
sourcepub fn system_time(&self) -> TimeVal
pub fn system_time(&self) -> TimeVal
Total amount of time spent executing in kernel mode.
Integral value expressed in kilobytes times ticks of execution indicating the amount of text memory shared with other processes.
Integral value expressed in kilobytes times ticks of execution indicating the amount of unshared memory used by data.
Integral value expressed in kilobytes times ticks of execution indicating the amount of unshared memory used for stack space.
sourcepub fn minor_page_faults(&self) -> c_long
pub fn minor_page_faults(&self) -> c_long
Number of page faults that were served without resorting to I/O, with pages that have been allocated previously by the kernel.
sourcepub fn major_page_faults(&self) -> c_long
pub fn major_page_faults(&self) -> c_long
Number of page faults that were served through I/O (i.e. swap).
sourcepub fn full_swaps(&self) -> c_long
pub fn full_swaps(&self) -> c_long
Number of times all of the memory was fully swapped out.
sourcepub fn block_reads(&self) -> c_long
pub fn block_reads(&self) -> c_long
Number of times a read was done from a block device.
sourcepub fn block_writes(&self) -> c_long
pub fn block_writes(&self) -> c_long
Number of times a write was done to a block device.
sourcepub fn ipc_receives(&self) -> c_long
pub fn ipc_receives(&self) -> c_long
Number of IPC messages received.
sourcepub fn voluntary_context_switches(&self) -> c_long
pub fn voluntary_context_switches(&self) -> c_long
Number of times a context switch was voluntarily invoked.
sourcepub fn involuntary_context_switches(&self) -> c_long
pub fn involuntary_context_switches(&self) -> c_long
Number of times a context switch was imposed by the kernel (usually due to time slice expiring or preemption by a higher priority process).
Trait Implementations§
impl Copy for Usage
impl Eq for Usage
impl StructuralPartialEq for Usage
Auto Trait Implementations§
impl Freeze for Usage
impl RefUnwindSafe for Usage
impl Send for Usage
impl Sync for Usage
impl Unpin for Usage
impl UnwindSafe for Usage
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)