pub struct CpuSnapshot {
pub logical_count: u16,
pub physical_count: MetricState<u16>,
pub total: MetricState<CpuUsage>,
pub per_core: MetricState<Vec<CpuUsage>>,
pub frequency_mhz: MetricState<u64>,
}Expand description
System-wide CPU state.
Fields§
§logical_count: u16Logical CPU count, including SMT siblings. Always known.
physical_count: MetricState<u16>Physical core count, where the platform reports it.
total: MetricState<CpuUsage>Aggregate machine utilization, 0..=100 (§8.3).
per_core: MetricState<Vec<CpuUsage>>Per-logical-CPU utilization, in stable index order.
frequency_mhz: MetricState<u64>Current clock, where reported.
Implementations§
Source§impl CpuSnapshot
impl CpuSnapshot
Sourcepub const fn warming_up(logical_count: u16) -> Self
pub const fn warming_up(logical_count: u16) -> Self
A snapshot with no measurements yet, for the first frame.
Trait Implementations§
Source§impl Clone for CpuSnapshot
impl Clone for CpuSnapshot
Source§fn clone(&self) -> CpuSnapshot
fn clone(&self) -> CpuSnapshot
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 moreSource§impl Debug for CpuSnapshot
impl Debug for CpuSnapshot
Source§impl PartialEq for CpuSnapshot
impl PartialEq for CpuSnapshot
impl StructuralPartialEq for CpuSnapshot
Auto Trait Implementations§
impl Freeze for CpuSnapshot
impl RefUnwindSafe for CpuSnapshot
impl Send for CpuSnapshot
impl Sync for CpuSnapshot
impl Unpin for CpuSnapshot
impl UnsafeUnpin for CpuSnapshot
impl UnwindSafe for CpuSnapshot
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