[−][src]Struct bustle::Workload
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]
<T::Handle as CollectionHandle>::Key: Send + Debug,
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
Auto Trait Implementations
impl RefUnwindSafe for Workload
impl Send for Workload
impl Sync for Workload
impl Unpin for Workload
impl UnwindSafe for Workload
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,