Struct tiny_bench::BenchmarkConfig
source · [−]pub struct BenchmarkConfig {
pub measurement_time: Duration,
pub num_resamples: usize,
pub num_samples: usize,
pub warm_up_time: Duration,
pub dump_results_to_disk: bool,
}
Expand description
Struct containing all of the configuration options for a benchmark.
Fields
measurement_time: Duration
How long the bench ‘should’ run, num_samples
is prioritized so benching will take
longer to be able to collect num_samples
if the code to be benched is slower
than this time limit allowed.
num_resamples: usize
How many resamples should be done
num_samples: usize
Recommended at least 50, above 100 https://en.wikipedia.org/wiki/Bootstrapping_(statistics)#Recommendations doesn’t seem to yield a significantly different result
warm_up_time: Duration
How long the bench should warm up
dump_results_to_disk: bool
Puts results in target/tiny-bench/label/.. if target can be found. used for comparing previous runs
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BenchmarkConfig
impl Send for BenchmarkConfig
impl Sync for BenchmarkConfig
impl Unpin for BenchmarkConfig
impl UnwindSafe for BenchmarkConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more