pub struct BenchmarkComparison {
pub benchmark_name: String,
pub baseline: PerformanceMetrics,
pub current: PerformanceMetrics,
pub performance_ratio: f64,
pub memory_ratio: f64,
pub regression_detected: bool,
pub improvement_percent: f64,
}Expand description
Benchmark comparison results
Fields§
§benchmark_name: StringName of the benchmark
baseline: PerformanceMetricsBaseline performance metrics
current: PerformanceMetricsCurrent performance metrics
performance_ratio: f64Performance ratio (current / baseline)
memory_ratio: f64Memory ratio (current / baseline)
regression_detected: boolRegression detected flag
improvement_percent: f64Improvement percentage
Implementations§
Source§impl BenchmarkComparison
impl BenchmarkComparison
Sourcepub fn new(
benchmark_name: String,
baseline: PerformanceMetrics,
current: PerformanceMetrics,
) -> Self
pub fn new( benchmark_name: String, baseline: PerformanceMetrics, current: PerformanceMetrics, ) -> Self
Compute performance and memory ratios by comparing current against the baseline
Sourcepub fn has_improvement(&self) -> bool
pub fn has_improvement(&self) -> bool
Check if there’s a significant improvement (>5%)
Sourcepub fn has_memory_regression(&self) -> bool
pub fn has_memory_regression(&self) -> bool
Check if there’s a significant memory increase (>20%)
Trait Implementations§
Source§impl Clone for BenchmarkComparison
impl Clone for BenchmarkComparison
Source§fn clone(&self) -> BenchmarkComparison
fn clone(&self) -> BenchmarkComparison
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 BenchmarkComparison
impl RefUnwindSafe for BenchmarkComparison
impl Send for BenchmarkComparison
impl Sync for BenchmarkComparison
impl Unpin for BenchmarkComparison
impl UnsafeUnpin for BenchmarkComparison
impl UnwindSafe for BenchmarkComparison
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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