pub struct ObservabilityManager { /* private fields */ }Expand description
Observability manager for tracking metrics and events
Implementations§
Source§impl ObservabilityManager
impl ObservabilityManager
pub fn new() -> Self
Sourcepub fn record_error(&self, error: &DatabaseError)
pub fn record_error(&self, error: &DatabaseError)
Record an error occurrence
Sourcepub fn record_checksum_failure(&self)
pub fn record_checksum_failure(&self)
Record a checksum failure
Sourcepub fn record_sync_start(&self, dirty_count: usize, dirty_bytes: usize)
pub fn record_sync_start(&self, dirty_count: usize, dirty_bytes: usize)
Record sync start
Sourcepub fn record_sync_success(&self, duration_ms: u64, blocks_synced: usize)
pub fn record_sync_success(&self, duration_ms: u64, blocks_synced: usize)
Record sync success
Sourcepub fn record_sync_failure(&self, error: &DatabaseError)
pub fn record_sync_failure(&self, error: &DatabaseError)
Record sync failure
Sourcepub fn record_backpressure(&self, level: &str, reason: &str)
pub fn record_backpressure(&self, level: &str, reason: &str)
Record backpressure event
Sourcepub fn calculate_throughput(&self, duration_ms: u64) -> (f64, f64)
pub fn calculate_throughput(&self, duration_ms: u64) -> (f64, f64)
Calculate throughput metrics
Sourcepub fn calculate_error_rate(&self, total_operations: u64) -> f64
pub fn calculate_error_rate(&self, total_operations: u64) -> f64
Calculate error rate
Sourcepub fn get_error_count(&self) -> u64
pub fn get_error_count(&self) -> u64
Get current error count
Sourcepub fn get_checksum_failures(&self) -> u64
pub fn get_checksum_failures(&self) -> u64
Get current checksum failure count
Sourcepub fn get_sync_count(&self) -> u64
pub fn get_sync_count(&self) -> u64
Get current sync count
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ObservabilityManager
impl !RefUnwindSafe for ObservabilityManager
impl Send for ObservabilityManager
impl Sync for ObservabilityManager
impl Unpin for ObservabilityManager
impl !UnwindSafe for ObservabilityManager
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