pub enum BenchError {
Show 18 variants
Io(Error),
Serialization(Error),
Profiler {
source: ProfilerErrorKind,
},
BenchmarkExecution {
message: String,
benchmark_name: Option<String>,
},
ReportGeneration {
format: String,
message: String,
},
RegressionDetection(String),
Baseline {
path: PathBuf,
message: String,
},
Comparison(String),
InvalidConfiguration(String),
MissingDependency {
dependency: String,
feature: String,
},
ScenarioFailed {
scenario: String,
message: String,
},
SystemResource(String),
MemoryProfiling(String),
CpuProfiling(String),
Flamegraph(String),
DataValidation(String),
Timeout {
seconds: u64,
},
Other(String),
}Expand description
Comprehensive error type for benchmarking operations.
Variants§
Io(Error)
I/O error occurred during benchmarking.
Serialization(Error)
Serialization/deserialization error.
Profiler
Profiler initialization or execution error.
Fields
source: ProfilerErrorKindThe underlying error source
BenchmarkExecution
Benchmark execution error.
Fields
ReportGeneration
Report generation error.
RegressionDetection(String)
Regression detection error.
Baseline
Baseline file error.
Comparison(String)
Comparison error.
InvalidConfiguration(String)
Invalid configuration error.
MissingDependency
Missing dependency error (e.g., feature not enabled).
ScenarioFailed
Scenario execution error.
SystemResource(String)
System resource error.
MemoryProfiling(String)
Memory profiling error.
CpuProfiling(String)
CPU profiling error.
Flamegraph(String)
Flamegraph generation error.
DataValidation(String)
Data validation error.
Timeout
Timeout error.
Other(String)
Generic error for other cases.
Implementations§
Source§impl BenchError
impl BenchError
Sourcepub fn profiler_init<S: Into<String>>(message: S) -> Self
pub fn profiler_init<S: Into<String>>(message: S) -> Self
Creates a new profiler initialization error.
Sourcepub fn profiler_start<S: Into<String>>(message: S) -> Self
pub fn profiler_start<S: Into<String>>(message: S) -> Self
Creates a new profiler start error.
Sourcepub fn profiler_stop<S: Into<String>>(message: S) -> Self
pub fn profiler_stop<S: Into<String>>(message: S) -> Self
Creates a new profiler stop error.
Sourcepub fn profiler_collect<S: Into<String>>(message: S) -> Self
pub fn profiler_collect<S: Into<String>>(message: S) -> Self
Creates a new profiler collection error.
Sourcepub fn benchmark_execution<S: Into<String>>(message: S) -> Self
pub fn benchmark_execution<S: Into<String>>(message: S) -> Self
Creates a new benchmark execution error.
Sourcepub fn benchmark_execution_with_name<S1: Into<String>, S2: Into<String>>(
name: S1,
message: S2,
) -> Self
pub fn benchmark_execution_with_name<S1: Into<String>, S2: Into<String>>( name: S1, message: S2, ) -> Self
Creates a new benchmark execution error with name.
Sourcepub fn report_generation<S1: Into<String>, S2: Into<String>>(
format: S1,
message: S2,
) -> Self
pub fn report_generation<S1: Into<String>, S2: Into<String>>( format: S1, message: S2, ) -> Self
Creates a new report generation error.
Sourcepub fn baseline<P: Into<PathBuf>, S: Into<String>>(path: P, message: S) -> Self
pub fn baseline<P: Into<PathBuf>, S: Into<String>>(path: P, message: S) -> Self
Creates a new baseline error.
Sourcepub fn scenario_failed<S1: Into<String>, S2: Into<String>>(
scenario: S1,
message: S2,
) -> Self
pub fn scenario_failed<S1: Into<String>, S2: Into<String>>( scenario: S1, message: S2, ) -> Self
Creates a new scenario failed error.
Trait Implementations§
Source§impl Debug for BenchError
impl Debug for BenchError
Source§impl Display for BenchError
impl Display for BenchError
Source§impl Error for BenchError
impl Error for BenchError
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()