pub struct CpuStats {
pub model: String,
pub total_percent: f32,
pub per_core_percent: Vec<f32>,
pub per_core_mhz: Vec<u64>,
pub load_average: Option<[f64; 3]>,
pub temperatures: Vec<Temperature>,
}Expand description
CPU-wide and per-core statistics.
Fields§
§model: StringBrand string of the first CPU (e.g. “AMD Ryzen 9 9950X3D 16-Core Processor”).
total_percent: f32Usage across all logical cores.
per_core_percent: Vec<f32>Usage of each logical core, in OS order.
per_core_mhz: Vec<u64>Current frequency of each logical core in MHz.
load_average: Option<[f64; 3]>1, 5 and 15 minute load averages; None on platforms without them
(Windows).
temperatures: Vec<Temperature>CPU temperature readings, e.g. Tctl, Tccd1, Tccd2 on AMD or
Package id 0, Core 0.. on Intel.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CpuStats
impl<'de> Deserialize<'de> for CpuStats
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
Auto Trait Implementations§
impl Freeze for CpuStats
impl RefUnwindSafe for CpuStats
impl Send for CpuStats
impl Sync for CpuStats
impl Unpin for CpuStats
impl UnsafeUnpin for CpuStats
impl UnwindSafe for CpuStats
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