pub struct IoCounters {
pub bytes_read: u64,
pub bytes_written: u64,
pub read_ops: u64,
pub write_ops: u64,
pub read_time_s: f64,
pub write_time_s: f64,
}Expand description
Aggregated I/O performance counters.
Fields§
§bytes_read: u64Total bytes read across all operations.
bytes_written: u64Total bytes written across all operations.
read_ops: u64Number of read operations.
write_ops: u64Number of write operations.
read_time_s: f64Cumulative wall-clock time spent in read calls (seconds).
write_time_s: f64Cumulative wall-clock time spent in write calls (seconds).
Implementations§
Source§impl IoCounters
impl IoCounters
Sourcepub fn record_read(&mut self, bytes: u64, elapsed_s: f64)
pub fn record_read(&mut self, bytes: u64, elapsed_s: f64)
Record a completed read operation.
Sourcepub fn record_write(&mut self, bytes: u64, elapsed_s: f64)
pub fn record_write(&mut self, bytes: u64, elapsed_s: f64)
Record a completed write operation.
Sourcepub fn avg_read_bw_mb(&self) -> f64
pub fn avg_read_bw_mb(&self) -> f64
Average read bandwidth in MB/s.
Sourcepub fn avg_write_bw_mb(&self) -> f64
pub fn avg_write_bw_mb(&self) -> f64
Average write bandwidth in MB/s.
Sourcepub fn merge(&mut self, other: &IoCounters)
pub fn merge(&mut self, other: &IoCounters)
Merge another counter set into this one.
Trait Implementations§
Source§impl Clone for IoCounters
impl Clone for IoCounters
Source§fn clone(&self) -> IoCounters
fn clone(&self) -> IoCounters
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IoCounters
impl Debug for IoCounters
Source§impl Default for IoCounters
impl Default for IoCounters
Source§fn default() -> IoCounters
fn default() -> IoCounters
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for IoCounters
impl RefUnwindSafe for IoCounters
impl Send for IoCounters
impl Sync for IoCounters
impl Unpin for IoCounters
impl UnsafeUnpin for IoCounters
impl UnwindSafe for IoCounters
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.