#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub(crate) struct ClusterId {
pub kind: ClusterKind,
pub index: u8,
}
impl ClusterId {
pub const fn efficiency(index: u8) -> Self {
Self {
kind: ClusterKind::Efficiency,
index,
}
}
pub const fn performance(index: u8) -> Self {
Self {
kind: ClusterKind::Performance,
index,
}
}
pub const fn super_core(index: u8) -> Self {
Self {
kind: ClusterKind::Super,
index,
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub(crate) enum ClusterKind {
Efficiency,
Performance,
Super,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub(crate) enum MetricKey {
ClusterActivePercent(ClusterId),
CpuActivePercent(u16),
CpuFreqPercent(u16),
GpuActivePercent,
GpuFreqPercent,
AneActivePercent,
CpuPowerW,
GpuPowerW,
AnePowerW,
PackagePowerW,
RamUsageBytes,
SwapUsageBytes,
}