pub struct OperationStats {
pub total_reads: u64,
pub successful_reads: u64,
pub failed_reads: u64,
pub total_writes: u64,
pub successful_writes: u64,
pub failed_writes: u64,
pub avg_read_time_ms: Option<u64>,
pub avg_write_time_ms: Option<u64>,
pub timeout_count: u64,
}Expand description
Statistics about read/write operations.
Fields§
§total_reads: u64Total read operations.
successful_reads: u64Successful read operations.
failed_reads: u64Failed read operations.
total_writes: u64Total write operations.
successful_writes: u64Successful write operations.
failed_writes: u64Failed write operations.
avg_read_time_ms: Option<u64>Average read time in milliseconds.
avg_write_time_ms: Option<u64>Average write time in milliseconds.
timeout_count: u64Number of timeout errors.
Implementations§
Source§impl OperationStats
impl OperationStats
Sourcepub fn read_success_rate(&self) -> f64
pub fn read_success_rate(&self) -> f64
Calculate the read success rate as a percentage.
Sourcepub fn write_success_rate(&self) -> f64
pub fn write_success_rate(&self) -> f64
Calculate the write success rate as a percentage.
Trait Implementations§
Source§impl Clone for OperationStats
impl Clone for OperationStats
Source§fn clone(&self) -> OperationStats
fn clone(&self) -> OperationStats
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 OperationStats
impl Debug for OperationStats
Source§impl Default for OperationStats
impl Default for OperationStats
Source§fn default() -> OperationStats
fn default() -> OperationStats
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OperationStats
impl<'de> Deserialize<'de> for OperationStats
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for OperationStats
impl RefUnwindSafe for OperationStats
impl Send for OperationStats
impl Sync for OperationStats
impl Unpin for OperationStats
impl UnwindSafe for OperationStats
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