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 UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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