Expand description
Unified error types for the perfgate ecosystem.
This crate provides a single, comprehensive error type that unifies all error variants from across the perfgate crates. It enables seamless error propagation and conversion between different error types.
§Error Categories
The PerfgateError enum is organized into categories:
- Validation: Bench name validation, config validation
- Stats: Statistical computation errors (no samples)
- Adapter: Process execution, I/O, platform-specific errors
- Config: Configuration parsing and validation errors
- IO: File system and network I/O errors
- Paired: Paired benchmark errors
§Example
use perfgate_error::{PerfgateError, ValidationError};
fn validate_name(name: &str) -> Result<(), PerfgateError> {
if name.is_empty() {
return Err(ValidationError::Empty.into());
}
Ok(())
}
let err = validate_name("").unwrap_err();
assert!(matches!(err, PerfgateError::Validation(ValidationError::Empty)));Enums§
- Adapter
Error - Config
Validation Error - Error
Category - IoError
- Paired
Error - Perfgate
Error - Stats
Error - Validation
Error