pub struct IoStats {Show 13 fields
pub transactions: u64,
pub reads: u64,
pub cache_reads: u64,
pub writes: u64,
pub bytes_read: u64,
pub cache_read_bytes: u64,
pub bytes_written: u64,
pub deletes: u64,
pub prefix_deletes: u64,
pub write_size_buckets: HashMap<usize, u64>,
pub tx_write_size_buckets: HashMap<usize, (u64, f64)>,
pub started: u64,
pub span: Duration,
}Expand description
Statistic for the span period
Fields§
§transactions: u64Number of transaction.
reads: u64Number of read operations.
cache_reads: u64Number of reads resulted in a read from cache.
writes: u64Number of write operations.
bytes_read: u64Number of bytes read
cache_read_bytes: u64Number of bytes read from cache
bytes_written: u64Number of bytes write
deletes: u64Number of delete operations.
prefix_deletes: u64Number of prefix (batch) delete operations.
write_size_buckets: HashMap<usize, u64>Write size buckets. Keys are write sizes, slightly rounded upwards. Values are the number of times a value of a particular size was written.
tx_write_size_buckets: HashMap<usize, (u64, f64)>Similar to write_size_buckets but tracks total sizes of transactions
and the average duration for a transaction of that size. The duration is
in microseconds.
started: u64Start of the statistic period in microseconds since epoch.
span: DurationTotal duration of the statistic period.
Implementations§
Source§impl IoStats
impl IoStats
Sourcepub fn record_write(&mut self, size: usize)
pub fn record_write(&mut self, size: usize)
Record a write operation with a given size.
Sourcepub fn record_tx_write(&mut self, size: usize, duration_micros: f64)
pub fn record_tx_write(&mut self, size: usize, duration_micros: f64)
Record a transaction operation with a given size. This tracks sizes of all values within transactions rather than individual writes.
Sourcepub fn avg_batch_size(&self) -> f64
pub fn avg_batch_size(&self) -> f64
Average batch (transaction) size (writes per transaction)
Sourcepub fn reads_per_sec(&self) -> f64
pub fn reads_per_sec(&self) -> f64
Read operations per second.
pub fn byte_reads_per_sec(&self) -> f64
Sourcepub fn writes_per_sec(&self) -> f64
pub fn writes_per_sec(&self) -> f64
Write operations per second.
pub fn byte_writes_per_sec(&self) -> f64
Sourcepub fn ops_per_sec(&self) -> f64
pub fn ops_per_sec(&self) -> f64
Total number of operations per second.
Sourcepub fn transactions_per_sec(&self) -> f64
pub fn transactions_per_sec(&self) -> f64
Transactions per second.