pub struct Mix {
pub read: u8,
pub insert: u8,
pub remove: u8,
pub update: u8,
pub upsert: u8,
}
Expand description
A workload mix configration.
The sum of the fields must add to 100.
Fields§
§read: u8
The percentage of operations in the mix that are reads.
insert: u8
The percentage of operations in the mix that are inserts.
remove: u8
The percentage of operations in the mix that are removals.
update: u8
The percentage of operations in the mix that are updates.
upsert: u8
The percentage of operations in the mix that are update-or-inserts.
Implementations§
source§impl Mix
impl Mix
sourcepub fn read_heavy() -> Self
pub fn read_heavy() -> Self
Constructs a very read-heavy workload (~95%), with limited concurrent modifications.
sourcepub fn insert_heavy() -> Self
pub fn insert_heavy() -> Self
Constructs a very insert-heavy workload (~80%), with some reads and updates.
sourcepub fn update_heavy() -> Self
pub fn update_heavy() -> Self
Constructs a very update-heavy workload (~50%), with some other modifications and the rest reads.