pub fn gen_batch(&mut self, batch_idx: usize) -> Option<ColumnarRecords> {
        let batch_start = self.batch_max_count * batch_idx;
        let batch_end = cmp::min(batch_start + self.batch_max_count, self.record_count);
        if batch_start >= batch_end {
            return None;
        }
        let mut batch = ColumnarRecordsBuilder::default();
        batch.reserve(
            batch_end - batch_start,
            self.record_size_bytes - TS_DIFF_GOODPUT_SIZE,
            0,
        );
        for record_idx in batch_start..batch_end {
            batch.push(self.gen_record(record_idx));
        }
        Some(batch.finish())
    }
/// Generates the requested batch of records.
Generates the requested batch of records.
Generates the requested batch of records .
pub fn gen_batch(&mut self, batch_idx: usize) -> Option<ColumnarRecords> {
        let batch_start = self.batch_max_count * batch_idx;
        let batch_end = cmp::min(batch_start + self.batch_max_count, self.record_count);
        if batch_start >= batch_end {
            return None;
        }
        let mut batch = ColumnarRecordsBuilder::default();
        batch.reserve(
            batch_end - batch_start,
            self.record_size_bytes - TS_DIFF_GOODPUT_SIZE,
            0,
        );
        for record_idx in batch_start..batch_end {
            batch.push(self.gen_record(record_idx));
        }
        Some(batch.finish())
    }
pub fn gen_batch ( & mut self , batch_idx : usize ) -> Option < ColumnarRecords > { let batch_start = self . batch_max_count * batch_idx ; let batch_end = cmp :: min ( batch_start + self . batch_max_count , self . record_count ) ; if batch_start >= batch_end { return None ; } let mut batch = ColumnarRecordsBuilder :: default ( ) ; batch . reserve ( batch_end - batch_start , self . record_size_bytes - TS_DIFF_GOODPUT_SIZE , 0 , ) ; for record_idx in batch_start .. batch_end { batch . push ( self . gen_record ( record_idx ) ) ; } Some ( batch . finish ( ) ) }
Generates the requested batch of records.
Generates the requested batch of records .
&mut self
batch_idx
usize
&mut self
batch_idx
usize