pub enum JouleProfilerError {
Show 17 variants
CommandExecutionFailed(String),
CommandNotFound(String),
EmptyCommand,
OutputFileCreationFailed(String),
InvalidPattern(Error),
StdOutCaptureFail,
CannotRetrieveSudoUser,
CannotParseEnvVariable(String),
CannotRetrieveCurrentUserId,
InvalidUnit(String),
IoError(Error),
NoSourceConfigured,
ProcessControlFailed(String),
ReaderThreadSpawnFailed(String),
ReaderThreadPanicked,
MetricSourceError(MetricSourceError),
OrchestratorError(OrchestratorError),
}Expand description
Top-level error type for JouleProfiler.
Represents all possible errors that can occur during profiler execution, from initialization and orchestration to source errors and aggregation.
Variants§
CommandExecutionFailed(String)
The profiled command failed during execution.
CommandNotFound(String)
The profiled command binary was not found on the system.
EmptyCommand
OutputFileCreationFailed(String)
The output file could not be created at the given path.
InvalidPattern(Error)
The provided token pattern is not a valid regular expression.
StdOutCaptureFail
Failed to capture the profiled command’s stdout.
CannotRetrieveSudoUser
Failed to retrieve SUDO_USER environment variable.
CannotParseEnvVariable(String)
The environment variable exists but is not parsable into the wanted format.
CannotRetrieveCurrentUserId
Unable to retrieve the current effective user id by it’s name with the getpwnam libc function.
InvalidUnit(String)
Cannot convert string to a known metric unit.
IoError(Error)
Generic I/O error.
NoSourceConfigured
Returned when there’s no metric sources configured to profile the program with.
ProcessControlFailed(String)
A process control operation (e.g. kill, wait) failed.
ReaderThreadSpawnFailed(String)
Failed to spawn the stdout reader thread.
ReaderThreadPanicked
The stdout reader thread panicked before completing.
MetricSourceError(MetricSourceError)
Error propagated from a metric source.
OrchestratorError(OrchestratorError)
Error propagated from the source orchestrator.
Trait Implementations§
Source§impl Debug for JouleProfilerError
impl Debug for JouleProfilerError
Source§impl Display for JouleProfilerError
impl Display for JouleProfilerError
Source§impl Error for JouleProfilerError
impl Error for JouleProfilerError
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()