Struct persist::workload::DataGenerator [−][src]
pub struct DataGenerator {
pub record_count: usize,
pub record_size_bytes: usize,
pub batch_max_count: usize,
key_buf: Vec<u8>,
val_buf: Vec<u8>,
}
Expand description
A configurable data generator for benchmarking.
Fields
record_count: usize
The total number of records to produce.
record_size_bytes: usize
The number of “goodput” bytes to make each record.
batch_max_count: usize
The maximum number of records included in a generated batch of records.
key_buf: Vec<u8>
val_buf: Vec<u8>
Implementations
Returns a new DataGenerator.
Returns the number of “goodput” bytes represented by the entire dataset produced by this generator.
Returns a more easily human readable version of Self::goodput_bytes.
Generates the requested batch of records.
pub fn batches(&self) -> DataGeneratorBatchIterⓘNotable traits for DataGeneratorBatchIterimpl Iterator for DataGeneratorBatchIter type Item = ColumnarRecords;
pub fn batches(&self) -> DataGeneratorBatchIterⓘNotable traits for DataGeneratorBatchIterimpl Iterator for DataGeneratorBatchIter type Item = ColumnarRecords;
Notable traits for DataGeneratorBatchIter
impl Iterator for DataGeneratorBatchIter type Item = ColumnarRecords;
Returns an Iterator of all records in batches.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for DataGenerator
impl Send for DataGenerator
impl Sync for DataGenerator
impl Unpin for DataGenerator
impl UnwindSafe for DataGenerator
Blanket Implementations
Mutably borrows from an owned value. Read more
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