heim_cpu::os::linux

Trait CpuTimeExt

Source
pub trait CpuTimeExt {
    // Required methods
    fn nice(&self) -> Time;
    fn io_wait(&self) -> Time;
    fn irq(&self) -> Time;
    fn soft_irq(&self) -> Time;
    fn steal(&self) -> Time;
    fn guest(&self) -> Option<Time>;
    fn guest_nice(&self) -> Option<Time>;
}
Expand description

Linux-specific extension for CpuTime.

Required Methods§

Source

fn nice(&self) -> Time

Returns time spent by niced (prioritized) processes executing in user mode, this also includes guest_nice time.

Source

fn io_wait(&self) -> Time

Returns time spent waiting for I/O to complete.

Source

fn irq(&self) -> Time

Returns time spent for servicing hardware interrupts.

Source

fn soft_irq(&self) -> Time

Returns time spent for servicing software interrupts.

Source

fn steal(&self) -> Time

Returns time spent by other operating systems running in a virtualized environment.

Source

fn guest(&self) -> Option<Time>

Returns time spent running a virtual CPU for guest operating systems under the control of the Linux kernel.

§Compatibility

Available for Linux 2.6.24+, older versions always returns None.

Source

fn guest_nice(&self) -> Option<Time>

Returns time spent running a niced guest (virtual CPU for guest operating systems under the control of the Linux kernel)

§Compatibility

Available for Linux 3.2.0+, older versions always returns None.

Implementors§