#[non_exhaustive]pub struct Usage {
pub user: Percent,
pub system: Percent,
pub idle: Percent,
pub iowait: Option<Percent>,
pub steal: Option<Percent>,
pub irq: Option<Percent>,
pub interval: Duration,
}Expand description
CPU usage over an interval.
Steal counts as busy (the CPU was not available to us) and iowait as idle (the CPU was free to run other work); both are also reported on their own where the OS keeps them (E-24, E-25).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.user: PercentRunning user code (nice included).
system: PercentRunning kernel code.
idle: PercentDoing nothing, iowait excluded.
iowait: Option<Percent>Idle while I/O was outstanding (Linux).
steal: Option<Percent>Taken by the hypervisor for other guests (Linux virtual machines).
irq: Option<Percent>Serving interrupts (Linux: hardware and software).
interval: DurationThe time the values cover.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Usage
impl RefUnwindSafe for Usage
impl Send for Usage
impl Sync for Usage
impl Unpin for Usage
impl UnsafeUnpin 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
Mutably borrows from an owned value. Read more