pub struct BenchmarkResult {
pub name: String,
pub samples: Vec<Duration>,
pub mean: Duration,
pub p50: Duration,
pub p99: Duration,
}Expand description
The result of a finished benchmark.
Fields§
§name: StringStable name of the benchmark.
samples: Vec<Duration>All raw sample durations.
mean: DurationMean sample duration.
p50: Duration50th percentile sample duration.
p99: Duration99th percentile sample duration.
Implementations§
Source§impl BenchmarkResult
impl BenchmarkResult
Sourcepub fn compare_against_baseline(
&self,
baseline_mean: Option<Duration>,
threshold: Threshold,
) -> CheckResult
pub fn compare_against_baseline( &self, baseline_mean: Option<Duration>, threshold: Threshold, ) -> CheckResult
Compare this result against a baseline mean. If baseline_mean
is None, the comparison is skipped and verdict is Skip.
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 (const: unstable) · 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 UnsafeUnpin 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