pub mod power_manager_metrics {
pub const CUSTOMER_NAME: &str = "fuchsia";
pub const CUSTOMER_ID: u32 = 1;
pub const PROJECT_NAME: &str = "power";
pub const PROJECT_ID: u32 = 3;
pub const RAW_TEMPERATURE_MIGRATED_INT_BUCKETS_FLOOR: i64 = 20;
pub const RAW_TEMPERATURE_MIGRATED_INT_BUCKETS_NUM_BUCKETS: u32 = 80;
pub const RAW_TEMPERATURE_MIGRATED_INT_BUCKETS_STEP_SIZE: u32 = 1;
pub const MIN_POWER_CONSUMPTION_INT_BUCKETS_FLOOR: i64 = 0;
pub const MIN_POWER_CONSUMPTION_INT_BUCKETS_NUM_BUCKETS: u32 = 100;
pub const MIN_POWER_CONSUMPTION_INT_BUCKETS_STEP_SIZE: u32 = 50;
pub const MAX_POWER_CONSUMPTION_INT_BUCKETS_FLOOR: i64 = 0;
pub const MAX_POWER_CONSUMPTION_INT_BUCKETS_NUM_BUCKETS: u32 = 100;
pub const MAX_POWER_CONSUMPTION_INT_BUCKETS_STEP_SIZE: u32 = 50;
pub const AVG_POWER_CONSUMPTION_INT_BUCKETS_FLOOR: i64 = 0;
pub const AVG_POWER_CONSUMPTION_INT_BUCKETS_NUM_BUCKETS: u32 = 100;
pub const AVG_POWER_CONSUMPTION_INT_BUCKETS_STEP_SIZE: u32 = 50;
pub const MEDIAN_POWER_CONSUMPTION_INT_BUCKETS_FLOOR: i64 = 0;
pub const MEDIAN_POWER_CONSUMPTION_INT_BUCKETS_NUM_BUCKETS: u32 = 100;
pub const MEDIAN_POWER_CONSUMPTION_INT_BUCKETS_STEP_SIZE: u32 = 50;
pub const THERMAL_LIMIT_RESULT_MIGRATED_METRIC_ID: u32 = 105;
pub const RAW_TEMPERATURE_MIGRATED_METRIC_ID: u32 = 106;
pub const MIN_POWER_CONSUMPTION_METRIC_ID: u32 = 1004;
pub const MAX_POWER_CONSUMPTION_METRIC_ID: u32 = 1005;
pub const AVG_POWER_CONSUMPTION_METRIC_ID: u32 = 1006;
pub const MEDIAN_POWER_CONSUMPTION_METRIC_ID: u32 = 1007;
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum PowerMetricDimensionResult {
Mitigated = 0,
Shutdown = 1,
}
impl cobalt_client::traits::AsEventCode for PowerMetricDimensionResult {
fn as_event_code(&self) -> u32 {
*self as u32
}
}
pub use PowerMetricDimensionResult as ThermalLimitResultMigratedMetricDimensionResult;
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum PowerMetricDimensionSensor {
Ambient = 0,
ThermalPolicyInput1 = 1,
}
impl cobalt_client::traits::AsEventCode for PowerMetricDimensionSensor {
fn as_event_code(&self) -> u32 {
*self as u32
}
}
pub use PowerMetricDimensionSensor as RawTemperatureMigratedMetricDimensionSensor;
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum PowerMetricDimensionSensorTarget {
Unknown = 0,
Mlb = 1,
Audio = 2,
}
impl cobalt_client::traits::AsEventCode for PowerMetricDimensionSensorTarget {
fn as_event_code(&self) -> u32 {
*self as u32
}
}
pub use PowerMetricDimensionSensorTarget as MinPowerConsumptionMetricDimensionSensorTarget;
pub use PowerMetricDimensionSensorTarget as MaxPowerConsumptionMetricDimensionSensorTarget;
pub use PowerMetricDimensionSensorTarget as AvgPowerConsumptionMetricDimensionSensorTarget;
pub use PowerMetricDimensionSensorTarget as MedianPowerConsumptionMetricDimensionSensorTarget;
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub enum PowerMetricDimensionIdleness {
Unknown = 0,
Idle = 1,
Active = 2,
}
impl cobalt_client::traits::AsEventCode for PowerMetricDimensionIdleness {
fn as_event_code(&self) -> u32 {
*self as u32
}
}
pub use PowerMetricDimensionIdleness as MinPowerConsumptionMetricDimensionIdleness;
pub use PowerMetricDimensionIdleness as MaxPowerConsumptionMetricDimensionIdleness;
pub use PowerMetricDimensionIdleness as AvgPowerConsumptionMetricDimensionIdleness;
pub use PowerMetricDimensionIdleness as MedianPowerConsumptionMetricDimensionIdleness;
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub struct MinPowerConsumptionEventCodes {
pub sensor_target: MinPowerConsumptionMetricDimensionSensorTarget,
pub idleness: MinPowerConsumptionMetricDimensionIdleness,
}
impl cobalt_client::traits::AsEventCodes for MinPowerConsumptionEventCodes {
fn as_event_codes(&self) -> Vec<u32> {
use cobalt_client::traits::AsEventCode;
vec![
self.sensor_target.as_event_code(),
self.idleness.as_event_code(),
]
}
}
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub struct MaxPowerConsumptionEventCodes {
pub sensor_target: MaxPowerConsumptionMetricDimensionSensorTarget,
pub idleness: MaxPowerConsumptionMetricDimensionIdleness,
}
impl cobalt_client::traits::AsEventCodes for MaxPowerConsumptionEventCodes {
fn as_event_codes(&self) -> Vec<u32> {
use cobalt_client::traits::AsEventCode;
vec![
self.sensor_target.as_event_code(),
self.idleness.as_event_code(),
]
}
}
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub struct AvgPowerConsumptionEventCodes {
pub sensor_target: AvgPowerConsumptionMetricDimensionSensorTarget,
pub idleness: AvgPowerConsumptionMetricDimensionIdleness,
}
impl cobalt_client::traits::AsEventCodes for AvgPowerConsumptionEventCodes {
fn as_event_codes(&self) -> Vec<u32> {
use cobalt_client::traits::AsEventCode;
vec![
self.sensor_target.as_event_code(),
self.idleness.as_event_code(),
]
}
}
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
pub struct MedianPowerConsumptionEventCodes {
pub sensor_target: MedianPowerConsumptionMetricDimensionSensorTarget,
pub idleness: MedianPowerConsumptionMetricDimensionIdleness,
}
impl cobalt_client::traits::AsEventCodes for MedianPowerConsumptionEventCodes {
fn as_event_codes(&self) -> Vec<u32> {
use cobalt_client::traits::AsEventCode;
vec![
self.sensor_target.as_event_code(),
self.idleness.as_event_code(),
]
}
}
}