pub struct RegressionConfig(/* private fields */);
default
only.Expand description
Configure performance regression checks and behavior
A performance regression check consists of an EventKind
and a percentage over which a
regression is assumed. If the percentage is negative, then a regression is assumed to be below
this limit. The default EventKind
is EventKind::Ir
with a value of
+10f64
If fail_fast
is set to true, then the whole benchmark run fails on the first encountered
regression. Else, the default behavior is, that the benchmark run fails with a regression error
after all benchmarks have been run.
§Examples
use iai_callgrind::{main, LibraryBenchmarkConfig, RegressionConfig};
main!(
config = LibraryBenchmarkConfig::default()
.regression(RegressionConfig::default());
library_benchmark_groups = some_group
);
Implementations§
Source§impl RegressionConfig
Enable performance regression checks with a RegressionConfig
impl RegressionConfig
Enable performance regression checks with a RegressionConfig
A performance regression check consists of an EventKind
and a percentage over which a
regression is assumed. If the percentage is negative, then a regression is assumed to be below
this limit. The default EventKind
is EventKind::Ir
with a value of
+10f64
If fail_fast
is set to true, then the whole benchmark run fails on the first encountered
regression. Else, the default behavior is, that the benchmark run fails with a regression error
after all benchmarks have been run.
§Examples
use iai_callgrind::{LibraryBenchmarkConfig, RegressionConfig};
main!(
config = LibraryBenchmarkConfig::default()
.regression(RegressionConfig::default());
library_benchmark_groups = some_group
);
Sourcepub fn limits<T>(&mut self, targets: T) -> &mut Self
pub fn limits<T>(&mut self, targets: T) -> &mut Self
Configure the limits percentages over/below which a performance regression can be assumed
A performance regression check consists of an EventKind
and a percentage over which a
regression is assumed. If the percentage is negative, then a regression is assumed to be
below this limit.
If no limits
or empty targets
are specified with this function, the default
EventKind
is EventKind::Ir
with a value of +10f64
§Examples
use iai_callgrind::{EventKind, RegressionConfig};
let config = RegressionConfig::default().limits([(EventKind::Ir, 5f64)]);
Sourcepub fn fail_fast(&mut self, value: bool) -> &mut Self
pub fn fail_fast(&mut self, value: bool) -> &mut Self
If set to true, then the benchmarks fail on the first encountered regression
The default is false
and the whole benchmark run fails with a regression error after all
benchmarks have been run.
§Examples
use iai_callgrind::RegressionConfig;
let config = RegressionConfig::default().fail_fast(true);
Trait Implementations§
Source§impl AsRef<RegressionConfig> for RegressionConfig
impl AsRef<RegressionConfig> for RegressionConfig
Source§fn as_ref(&self) -> &InternalRegressionConfig
fn as_ref(&self) -> &InternalRegressionConfig
Source§impl Clone for RegressionConfig
impl Clone for RegressionConfig
Source§fn clone(&self) -> RegressionConfig
fn clone(&self) -> RegressionConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more