pub struct RecoveryStats {
pub total_operations: usize,
pub successful_operations: usize,
pub failed_operations: usize,
pub total_retries: usize,
pub avg_retries_per_operation: f64,
pub avg_operation_duration: Duration,
pub error_type_distribution: HashMap<ErrorType, usize>,
}Expand description
Recovery statistics
Fields§
§total_operations: usizeTotal number of operations attempted
successful_operations: usizeNumber of successful operations
failed_operations: usizeNumber of failed operations
total_retries: usizeTotal retry attempts
avg_retries_per_operation: f64Average retry attempts per operation
avg_operation_duration: DurationAverage operation duration
error_type_distribution: HashMap<ErrorType, usize>Error type distribution
Implementations§
Source§impl RecoveryStats
impl RecoveryStats
Sourcepub fn record_success(&mut self, retry_count: usize, duration: Duration)
pub fn record_success(&mut self, retry_count: usize, duration: Duration)
Record a successful operation
Sourcepub fn record_failure(
&mut self,
retry_count: usize,
duration: Duration,
error_type: ErrorType,
)
pub fn record_failure( &mut self, retry_count: usize, duration: Duration, error_type: ErrorType, )
Record a failed operation
Trait Implementations§
Source§impl Clone for RecoveryStats
impl Clone for RecoveryStats
Source§fn clone(&self) -> RecoveryStats
fn clone(&self) -> RecoveryStats
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 RecoveryStats
impl Debug for RecoveryStats
Source§impl<'de> Deserialize<'de> for RecoveryStats
impl<'de> Deserialize<'de> for RecoveryStats
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
Source§impl PartialEq for RecoveryStats
impl PartialEq for RecoveryStats
Source§impl Serialize for RecoveryStats
impl Serialize for RecoveryStats
impl StructuralPartialEq for RecoveryStats
Auto Trait Implementations§
impl Freeze for RecoveryStats
impl RefUnwindSafe for RecoveryStats
impl Send for RecoveryStats
impl Sync for RecoveryStats
impl Unpin for RecoveryStats
impl UnwindSafe for RecoveryStats
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