pub struct RegressionDetector { /* private fields */ }Expand description
Performance regression detection system
Implementations§
Source§impl RegressionDetector
impl RegressionDetector
Sourcepub fn with_threshold(self, threshold_factor: f64) -> Self
pub fn with_threshold(self, threshold_factor: f64) -> Self
Set the regression threshold factor (e.g., 1.5 = 50% slower)
Sourcepub fn with_min_samples(self, min_samples: usize) -> Self
pub fn with_min_samples(self, min_samples: usize) -> Self
Set minimum samples required for regression detection
Sourcepub fn record_baseline(&mut self, test_name: String, duration: Duration)
pub fn record_baseline(&mut self, test_name: String, duration: Duration)
Record a baseline measurement
Sourcepub fn check_regression(
&self,
test_name: &str,
current_duration: Duration,
) -> Option<RegressionResult>
pub fn check_regression( &self, test_name: &str, current_duration: Duration, ) -> Option<RegressionResult>
Check for performance regression
Sourcepub fn get_baseline(&self, test_name: &str) -> Option<&BaselineMetrics>
pub fn get_baseline(&self, test_name: &str) -> Option<&BaselineMetrics>
Get baseline metrics for a test
Sourcepub fn tracked_tests(&self) -> Vec<&String>
pub fn tracked_tests(&self) -> Vec<&String>
List all tracked tests
Sourcepub fn clear_baselines(&mut self)
pub fn clear_baselines(&mut self)
Clear all baselines
Trait Implementations§
Source§impl Clone for RegressionDetector
impl Clone for RegressionDetector
Source§fn clone(&self) -> RegressionDetector
fn clone(&self) -> RegressionDetector
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 RegressionDetector
impl Debug for RegressionDetector
Auto Trait Implementations§
impl Freeze for RegressionDetector
impl RefUnwindSafe for RegressionDetector
impl Send for RegressionDetector
impl Sync for RegressionDetector
impl Unpin for RegressionDetector
impl UnwindSafe for RegressionDetector
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