pub struct PowerStats {
pub cpu_package_w: Option<f32>,
pub gpus_w: Option<f32>,
pub igpu_w: Option<f32>,
pub total_w: Option<f32>,
}Expand description
Power draw summary.
There is no portable way to measure whole-system power without external hardware, so the total is the sum of the CPU package and discrete GPUs, which dominate consumption on typical workstations.
Fields§
§cpu_package_w: Option<f32>CPU package power (RAPL on Linux). None before the second sample or
when RAPL is unavailable.
gpus_w: Option<f32>Sum of power reported by discrete GPUs.
igpu_w: Option<f32>Integrated GPU power (e.g. amdgpu PPT). Reported separately and not added to the total, because it may already be part of the CPU package.
total_w: Option<f32>cpu_package_w + gpus_w, counting only the parts that are available.
Trait Implementations§
Source§impl Clone for PowerStats
impl Clone for PowerStats
Source§impl Debug for PowerStats
impl Debug for PowerStats
Source§impl Default for PowerStats
impl Default for PowerStats
Source§impl<'de> Deserialize<'de> for PowerStatswhere
PowerStats: Default,
impl<'de> Deserialize<'de> for PowerStatswhere
PowerStats: Default,
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 PowerStats
impl RefUnwindSafe for PowerStats
impl Send for PowerStats
impl Sync for PowerStats
impl Unpin for PowerStats
impl UnsafeUnpin for PowerStats
impl UnwindSafe for PowerStats
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