pub struct BenchmarkResult {Show 16 fields
pub benchmark_type: BenchmarkType,
pub operations: usize,
pub successful_operations: usize,
pub avg_duration_ms: f64,
pub min_duration_ms: f64,
pub max_duration_ms: f64,
pub median_duration_ms: f64,
pub p95_latency_ms: f64,
pub p99_latency_ms: f64,
pub std_deviation_ms: f64,
pub throughput_ops: f64,
pub total_time_ms: f64,
pub memory_bytes: Option<u64>,
pub peak_memory_bytes: Option<u64>,
pub cpu_utilization: Option<f64>,
pub timestamp: Instant,
}Expand description
Result of a benchmark run
Fields§
§benchmark_type: BenchmarkTypeType of benchmark
operations: usizeNumber of operations completed
successful_operations: usizeNumber of successful operations
avg_duration_ms: f64Average duration in milliseconds
min_duration_ms: f64Minimum duration in milliseconds
max_duration_ms: f64Maximum duration in milliseconds
median_duration_ms: f64Median duration (P50) in milliseconds
p95_latency_ms: f64P95 latency in milliseconds
p99_latency_ms: f64P99 latency in milliseconds
std_deviation_ms: f64Standard deviation
throughput_ops: f64Throughput in operations per second
total_time_ms: f64Total time spent in milliseconds
memory_bytes: Option<u64>Memory usage in bytes (if tracked)
peak_memory_bytes: Option<u64>Peak memory usage in bytes (if tracked)
cpu_utilization: Option<f64>CPU utilization percentage (if tracked)
timestamp: InstantTimestamp when benchmark started
Implementations§
Source§impl BenchmarkResult
impl BenchmarkResult
Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
Calculate success rate
Sourcepub fn meets_criteria(&self, max_avg_ms: f64, min_success_rate: f64) -> bool
pub fn meets_criteria(&self, max_avg_ms: f64, min_success_rate: f64) -> bool
Check if benchmark meets performance criteria
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 moreAuto 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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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