pub struct CpuMetrics {
pub logical_cores: u32,
pub usage_pct: f32,
pub iowait_pct: Option<f32>,
}Expand description
CPU utilization snapshot.
usage_pct is total CPU busy over the most recent sampling interval.
iowait_pct is the aggregate CPU I/O-wait time over the same interval;
it is Some(_) only when MetricCapabilities::cpu_iowait is true.
Fields§
§logical_cores: u32Number of logical CPU cores available to the kernel.
usage_pct: f32Total CPU busy percentage, 0.0..=100.0, derived from delta samples.
iowait_pct: Option<f32>Aggregate CPU I/O-wait percentage, 0.0..=100.0. None when the
platform does not expose this state.
Trait Implementations§
Source§impl Clone for CpuMetrics
impl Clone for CpuMetrics
Source§fn clone(&self) -> CpuMetrics
fn clone(&self) -> CpuMetrics
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CpuMetrics
Source§impl Debug for CpuMetrics
impl Debug for CpuMetrics
Source§impl<'de> Deserialize<'de> for CpuMetrics
impl<'de> Deserialize<'de> for CpuMetrics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CpuMetrics
impl PartialEq for CpuMetrics
Source§impl Serialize for CpuMetrics
impl Serialize for CpuMetrics
impl StructuralPartialEq for CpuMetrics
Auto Trait Implementations§
impl Freeze for CpuMetrics
impl RefUnwindSafe for CpuMetrics
impl Send for CpuMetrics
impl Sync for CpuMetrics
impl Unpin for CpuMetrics
impl UnsafeUnpin for CpuMetrics
impl UnwindSafe for CpuMetrics
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