pub struct Workload { /* private fields */ }
Expand description

A benchmark workload builder.

Implementations

Start building a new benchmark workload.

Set the initial capacity for the map.

Note that the capacity will be 2^ the given capacity!

The number of operations and the number of pre-filled keys are determined based on the computed initial capacity, so keep that in mind if you change this parameter.

Defaults to 25 (so 2^25 ~= 34M).

Set the fraction of the initial table capacity we should populate before running the benchmark.

Defaults to 0%.

Set the number of operations to run as a multiple of the initial capacity.

This value can exceed 1.0.

Defaults to 0.75 (75%).

Set the seed used to randomize the workload.

The seed does not dictate thread interleaving, so you will only observe the exact same workload if you run the benchmark with nthreads == 1.

Execute this workload against the collection type given by T.

The key type must be Send since we generate the keys on a different thread than the one we do the benchmarks on.

The key type must be Debug so that we can print meaningful errors if an assertion is violated during the benchmark.

Returns the seed used for the run.

Execute this workload against the collection type given by T.

The key type must be Send since we generate the keys on a different thread than the one we do the benchmarks on.

The key type must be Debug so that we can print meaningful errors if an assertion is violated during the benchmark.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. 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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more