pub struct PerformanceRegressionTester { /* private fields */ }Implementations§
Source§impl PerformanceRegressionTester
impl PerformanceRegressionTester
Sourcepub fn new(config: RegressionTestConfig) -> Self
pub fn new(config: RegressionTestConfig) -> Self
Create a new regression tester
Sourcepub fn load_baselines(&mut self) -> TorshResult<()>
pub fn load_baselines(&mut self) -> TorshResult<()>
Load baselines from file
Sourcepub fn save_baselines(&self) -> TorshResult<()>
pub fn save_baselines(&self) -> TorshResult<()>
Save baselines to file
Sourcepub fn create_baseline(
&mut self,
operation: &str,
benchmark_results: &BenchmarkResults,
commit_hash: Option<String>,
version: Option<String>,
) -> TorshResult<()>
pub fn create_baseline( &mut self, operation: &str, benchmark_results: &BenchmarkResults, commit_hash: Option<String>, version: Option<String>, ) -> TorshResult<()>
Create or update baseline for an operation
Sourcepub fn test_regression(
&self,
operation: &str,
current_results: &BenchmarkResults,
) -> TorshResult<RegressionTestResult>
pub fn test_regression( &self, operation: &str, current_results: &BenchmarkResults, ) -> TorshResult<RegressionTestResult>
Test for performance regression
Sourcepub fn generate_report(&self, results: &[RegressionTestResult]) -> String
pub fn generate_report(&self, results: &[RegressionTestResult]) -> String
Generate regression test report
Sourcepub fn list_baselines(&self) -> Vec<&PerformanceBaseline>
pub fn list_baselines(&self) -> Vec<&PerformanceBaseline>
List all available baselines
Sourcepub fn remove_baseline(&mut self, operation: &str) -> bool
pub fn remove_baseline(&mut self, operation: &str) -> bool
Remove a baseline
Sourcepub fn get_baseline(&self, operation: &str) -> Option<&PerformanceBaseline>
pub fn get_baseline(&self, operation: &str) -> Option<&PerformanceBaseline>
Get baseline for an operation
Auto Trait Implementations§
impl Freeze for PerformanceRegressionTester
impl RefUnwindSafe for PerformanceRegressionTester
impl Send for PerformanceRegressionTester
impl Sync for PerformanceRegressionTester
impl Unpin for PerformanceRegressionTester
impl UnsafeUnpin for PerformanceRegressionTester
impl UnwindSafe for PerformanceRegressionTester
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> 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