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

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.