pub struct BenchmarkResult {Show 19 fields
pub name: String,
pub mean_time: Duration,
pub std_dev_time: Duration,
pub min_time: Duration,
pub max_time: Duration,
pub median_time: Duration,
pub p95_time: Duration,
pub p99_time: Duration,
pub throughput: Option<f64>,
pub memory_usage: Option<MemoryUsage>,
pub cpu_metrics: Option<CpuMetrics>,
pub cache_metrics: Option<CacheMetrics>,
pub parallel_metrics: Option<ParallelMetrics>,
pub data_dimensions: (usize, usize),
pub performance_class: PerformanceClass,
pub confidence_interval: Option<(Duration, Duration)>,
pub outliers_detected: usize,
pub timestamp: DateTime<Utc>,
pub custom_metrics: HashMap<String, f64>,
}Expand description
Enhanced benchmark result with comprehensive metrics
Fields§
§name: StringName of the benchmark
mean_time: DurationMean execution time
std_dev_time: DurationStandard deviation of execution time
min_time: DurationMinimum execution time
max_time: DurationMaximum execution time
median_time: DurationMedian execution time
p95_time: Duration95th percentile execution time
p99_time: Duration99th percentile execution time
throughput: Option<f64>Number of samples processed per second
memory_usage: Option<MemoryUsage>Memory usage statistics
cpu_metrics: Option<CpuMetrics>CPU utilization metrics
cache_metrics: Option<CacheMetrics>Cache performance metrics
parallel_metrics: Option<ParallelMetrics>Parallel execution metrics
data_dimensions: (usize, usize)Input data dimensions
performance_class: PerformanceClassPerformance classification
confidence_interval: Option<(Duration, Duration)>Statistical confidence interval
outliers_detected: usizeNumber of outliers detected
timestamp: DateTime<Utc>Timestamp of benchmark execution
custom_metrics: HashMap<String, f64>Custom metrics and metadata
Implementations§
Source§impl BenchmarkResult
impl BenchmarkResult
Sourcepub fn new(
name: String,
times: Vec<Duration>,
data_dimensions: (usize, usize),
) -> Self
pub fn new( name: String, times: Vec<Duration>, data_dimensions: (usize, usize), ) -> Self
Create a new benchmark result
Sourcepub fn with_throughput(self, throughput: f64) -> Self
pub fn with_throughput(self, throughput: f64) -> Self
Set throughput
Sourcepub fn with_memory_usage(self, memory_usage: MemoryUsage) -> Self
pub fn with_memory_usage(self, memory_usage: MemoryUsage) -> Self
Set memory usage
Sourcepub fn performance_score(&self) -> f64
pub fn performance_score(&self) -> f64
Calculate performance score (higher is better)
Trait Implementations§
Source§impl Clone for BenchmarkResult
impl Clone for BenchmarkResult
Source§fn clone(&self) -> BenchmarkResult
fn clone(&self) -> BenchmarkResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BenchmarkResult
impl Debug for BenchmarkResult
Source§impl<'de> Deserialize<'de> for BenchmarkResult
impl<'de> Deserialize<'de> for BenchmarkResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BenchmarkResult
impl RefUnwindSafe for BenchmarkResult
impl Send for BenchmarkResult
impl Sync for BenchmarkResult
impl Unpin for BenchmarkResult
impl UnwindSafe for BenchmarkResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more