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: u8The percentage of operations in the mix that are reads.
insert: u8The percentage of operations in the mix that are inserts.
remove: u8The percentage of operations in the mix that are removals.
update: u8The percentage of operations in the mix that are updates.
upsert: u8The 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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mix
impl RefUnwindSafe for Mix
impl Send for Mix
impl Sync for Mix
impl Unpin for Mix
impl UnwindSafe for Mix
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more