pub struct PerfRegression { /* private fields */ }Expand description
Performance regression testing framework
Implementations§
Source§impl PerfRegression
impl PerfRegression
Sourcepub fn with_config(
backend_name: impl Into<String>,
config: BenchmarkConfig,
) -> Self
pub fn with_config( backend_name: impl Into<String>, config: BenchmarkConfig, ) -> Self
Create with custom config
Sourcepub fn benchmark<F, R>(
&mut self,
name: impl Into<String>,
f: F,
) -> Result<BenchmarkStats, String>where
F: FnMut() -> R,
pub fn benchmark<F, R>(
&mut self,
name: impl Into<String>,
f: F,
) -> Result<BenchmarkStats, String>where
F: FnMut() -> R,
Run a benchmark
Sourcepub fn results(&self) -> &HashMap<String, BenchmarkStats>
pub fn results(&self) -> &HashMap<String, BenchmarkStats>
Get current results
Sourcepub fn save_baseline<P: AsRef<Path>>(&self, dir: P) -> Result<()>
pub fn save_baseline<P: AsRef<Path>>(&self, dir: P) -> Result<()>
Save current results as baseline
Sourcepub fn compare_to_baseline<P: AsRef<Path>>(
&self,
dir: P,
) -> Result<RegressionReport>
pub fn compare_to_baseline<P: AsRef<Path>>( &self, dir: P, ) -> Result<RegressionReport>
Compare current results to baseline
Auto Trait Implementations§
impl Freeze for PerfRegression
impl RefUnwindSafe for PerfRegression
impl Send for PerfRegression
impl Sync for PerfRegression
impl Unpin for PerfRegression
impl UnwindSafe for PerfRegression
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