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,
pub max_iterations: Option<u64>,
}
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
max_iterations: Option<u64>
Sets a hard ceiling on max iterations, overriding the heuristic calculations for iteration count. A rule of thumb; if this is used, the results are unlikely to be statistically significant.