pub enum RaplError {
Show 20 variants
RaplNotAvailable(String),
NoDomains,
RaplReadError(String),
InvalidRaplPath(String),
InvalidSocketSpec(String),
SocketNotFound(u32),
CommandNotFound(String),
UnsupportedOS(String),
InsufficientPermissions,
UnknownDomain(String),
FailToOpenDomainCounter(String),
InvalidEventFormat(String),
DomainNotSupported(RaplDomainType),
PerfParanoid(PerfParanoidError),
RetrieveScaleError,
IoError(Error),
ParseEnergyError(ParseIntError),
ParseDomainScale(ParseFloatError),
NotEnoughSamples,
MutexPoisoned,
}Expand description
Errors that can occur when using the RAPL source.
Variants§
RaplNotAvailable(String)
Intel RAPL interface is not available on this system.
NoDomains
No RAPL domains were discovered on this system.
RaplReadError(String)
Failed to read a value from a RAPL domain.
InvalidRaplPath(String)
A RAPL sysfs path could not be parsed or resolved.
InvalidSocketSpec(String)
The socket specification string is malformed.
SocketNotFound(u32)
The requested socket index does not exist in the discovered RAPL domains.
CommandNotFound(String)
A required system command was not found.
UnsupportedOS(String)
RAPL is only supported on Linux.
InsufficientPermissions
The process lacks the required permissions to access RAPL counters.
UnknownDomain(String)
A RAPL domain name could not be matched to a known type.
FailToOpenDomainCounter(String)
No CPU in the socket was able to open the perf counter for this domain.
It can also appear if perf_event_open returns an error other than unsupported event for a specific CPU.
InvalidEventFormat(String)
The event format string for this domain could not be parsed.
DomainNotSupported(RaplDomainType)
This RAPL domain is not supported by the hardware.
PerfParanoid(PerfParanoidError)
The perf_event_paranoid level is too restrictive.
RetrieveScaleError
The energy scale factor could not be retrieved from the perf event.
IoError(Error)
Generic I/O error not covered by other variants.
ParseEnergyError(ParseIntError)
Failed to parse an energy value as an integer.
ParseDomainScale(ParseFloatError)
Failed to parse a domain scale value as a float.
NotEnoughSamples
Not enough snapshots have been taken to compute an energy delta.
MutexPoisoned
Trait Implementations§
Source§impl Error for RaplError
impl Error for RaplError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()