[][src]Struct bustle::Workload

pub struct Workload { /* fields omitted */ }

A benchmark workload builder.

Methods

impl Workload[src]

pub fn new(threads: usize, mix: Mix) -> Self[src]

Start building a new benchmark workload.

pub fn initial_capacity_log2(&mut self, capacity: u8) -> &mut Self[src]

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).

pub fn prefill_fraction(&mut self, fraction: f64) -> &mut Self[src]

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

Defaults to 0%.

pub fn operations(&mut self, multiple: f64) -> &mut Self[src]

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%).

pub fn seed(&mut self, seed: [u8; 16]) -> &mut Self[src]

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.

pub fn run<T: Collection>(&self) -> [u8; 16] where
    <T::Handle as CollectionHandle>::Key: Send + Debug
[src]

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.

Trait Implementations

impl Clone for Workload[src]

impl Copy for Workload[src]

impl Debug for Workload[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,