pub trait CpuManager {
// Required methods
fn device_count() -> Result<usize, ZeusdError>;
fn get_available_fields(
index: usize,
) -> Result<(Arc<PackageInfo>, Option<Arc<PackageInfo>>), ZeusdError>;
fn get_cpu_energy(&mut self) -> Result<u64, ZeusdError>;
fn get_dram_energy(&mut self) -> Result<u64, ZeusdError>;
fn is_dram_available(&self) -> bool;
}Required Methods§
Sourcefn device_count() -> Result<usize, ZeusdError>
fn device_count() -> Result<usize, ZeusdError>
Get the number of CPUs available.
Sourcefn get_available_fields(
index: usize,
) -> Result<(Arc<PackageInfo>, Option<Arc<PackageInfo>>), ZeusdError>
fn get_available_fields( index: usize, ) -> Result<(Arc<PackageInfo>, Option<Arc<PackageInfo>>), ZeusdError>
Get the CPU PackageInfo and the DRAM PackageInfo it is available.
Sourcefn get_cpu_energy(&mut self) -> Result<u64, ZeusdError>
fn get_cpu_energy(&mut self) -> Result<u64, ZeusdError>
Get the cumulative energy counter value of the CPU after compensating for wraparounds.
Sourcefn get_dram_energy(&mut self) -> Result<u64, ZeusdError>
fn get_dram_energy(&mut self) -> Result<u64, ZeusdError>
Get the cumulative energy counter value of the DRAM after compensating for wraparounds.
Sourcefn is_dram_available(&self) -> bool
fn is_dram_available(&self) -> bool
Check if DRAM is available.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.