pub struct PowerProfile {
pub total_power_draw: Option<f32>,
pub cpu_power: Option<f32>,
pub gpu_power: Option<f32>,
pub memory_power: Option<f32>,
pub storage_power: Option<f32>,
pub network_power: Option<f32>,
pub other_power: Option<f32>,
pub efficiency_score: f64,
pub thermal_throttling_risk: ThrottlingRisk,
pub power_state: PowerState,
pub available_power_modes: Vec<PowerMode>,
}
Expand description
Power consumption profile for the system
Fields§
§total_power_draw: Option<f32>
Total system power draw in watts
cpu_power: Option<f32>
CPU power consumption in watts
gpu_power: Option<f32>
GPU power consumption in watts
memory_power: Option<f32>
Memory power consumption in watts
storage_power: Option<f32>
Storage power consumption in watts
network_power: Option<f32>
Network interfaces power consumption in watts
other_power: Option<f32>
Other components power consumption in watts
efficiency_score: f64
Performance per watt efficiency score (0.0 to 1.0)
thermal_throttling_risk: ThrottlingRisk
Risk level of thermal throttling
power_state: PowerState
Current power management state
available_power_modes: Vec<PowerMode>
Available power saving modes
Implementations§
Source§impl PowerProfile
impl PowerProfile
Sourcepub fn estimate_battery_life(&self, battery: &BatteryInfo) -> Option<Duration>
pub fn estimate_battery_life(&self, battery: &BatteryInfo) -> Option<Duration>
Estimate battery life based on current power consumption
Sourcepub fn suggest_power_optimizations(&self) -> Vec<PowerOptimization>
pub fn suggest_power_optimizations(&self) -> Vec<PowerOptimization>
Get power optimization recommendations
Sourcepub fn calculate_efficiency_with_performance(
&self,
performance_score: f64,
) -> f64
pub fn calculate_efficiency_with_performance( &self, performance_score: f64, ) -> f64
Calculate power efficiency score based on performance and consumption
Trait Implementations§
Source§impl Clone for PowerProfile
impl Clone for PowerProfile
Source§fn clone(&self) -> PowerProfile
fn clone(&self) -> PowerProfile
Returns a duplicate of the value. Read more
1.0.0 · 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 PowerProfile
impl Debug for PowerProfile
Source§impl<'de> Deserialize<'de> for PowerProfile
impl<'de> Deserialize<'de> for PowerProfile
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 PowerProfile
impl RefUnwindSafe for PowerProfile
impl Send for PowerProfile
impl Sync for PowerProfile
impl Unpin for PowerProfile
impl UnwindSafe for PowerProfile
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