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>,
pub per_core_celsius: Vec<Option<f32>>,
}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 on Intel. Per-core readings that could be matched to
logical cores are in CpuStats::per_core_celsius instead.
per_core_celsius: Vec<Option<f32>>Temperature of the physical core of each logical core, in OS order (Intel’s coretemp). Empty when the CPU has no per-core sensors.
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