pub struct ErrorStatistics {
pub total_errors: u64,
pub errors_by_type: HashMap<String, u64>,
pub successful_recoveries: u64,
pub failed_recoveries: u64,
pub index_rebuilds: u64,
pub last_error_time: Option<SystemTime>,
pub error_rate: f64,
}
Expand description
Error statistics for basic trend analysis
Fields§
§total_errors: u64
Total errors encountered
errors_by_type: HashMap<String, u64>
Errors by type
successful_recoveries: u64
Successful recoveries
failed_recoveries: u64
Failed recoveries
index_rebuilds: u64
Index rebuilds performed
last_error_time: Option<SystemTime>
Last error timestamp
error_rate: f64
Error rate (errors per hour)
Implementations§
Source§impl ErrorStatistics
impl ErrorStatistics
Sourcepub fn recovery_success_rate(&self) -> f64
pub fn recovery_success_rate(&self) -> f64
Calculate recovery success rate
Sourcepub fn error_trend(&self) -> ErrorTrend
pub fn error_trend(&self) -> ErrorTrend
Get error trend (increasing/decreasing)
Trait Implementations§
Source§impl Clone for ErrorStatistics
impl Clone for ErrorStatistics
Source§fn clone(&self) -> ErrorStatistics
fn clone(&self) -> ErrorStatistics
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 ErrorStatistics
impl Debug for ErrorStatistics
Source§impl Default for ErrorStatistics
impl Default for ErrorStatistics
Source§fn default() -> ErrorStatistics
fn default() -> ErrorStatistics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ErrorStatistics
impl RefUnwindSafe for ErrorStatistics
impl Send for ErrorStatistics
impl Sync for ErrorStatistics
impl Unpin for ErrorStatistics
impl UnwindSafe for ErrorStatistics
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more