pub struct MetricsCollector { /* private fields */ }
Expand description
Comprehensive metrics collector for task queue operations
Implementations§
Source§impl MetricsCollector
impl MetricsCollector
pub fn new() -> Self
Sourcepub async fn increment_counter(&self, name: &str, value: u64)
pub async fn increment_counter(&self, name: &str, value: u64)
Increment a counter metric
Sourcepub async fn record_timing(&self, name: &str, duration: Duration)
pub async fn record_timing(&self, name: &str, duration: Duration)
Record a timing measurement
Sourcepub fn track_allocation(&self, bytes: usize)
pub fn track_allocation(&self, bytes: usize)
Track memory allocation
Sourcepub fn track_deallocation(&self, bytes: usize)
pub fn track_deallocation(&self, bytes: usize)
Track memory deallocation
Sourcepub fn track_task_start(&self)
pub fn track_task_start(&self)
Track task start
Sourcepub fn track_task_end(&self)
pub fn track_task_end(&self)
Track task completion
Sourcepub async fn record_task_execution(
&self,
task_name: &str,
duration: Duration,
success: bool,
)
pub async fn record_task_execution( &self, task_name: &str, duration: Duration, success: bool, )
Record task execution time for performance analysis
Sourcepub async fn get_system_metrics(&self) -> SystemMetrics
pub async fn get_system_metrics(&self) -> SystemMetrics
Get comprehensive metrics snapshot
Sourcepub async fn get_metrics_summary(&self) -> String
pub async fn get_metrics_summary(&self) -> String
Get a simple metrics summary for quick debugging
Sourcepub async fn get_performance_report(&self) -> PerformanceReport
pub async fn get_performance_report(&self) -> PerformanceReport
Get comprehensive performance report
Sourcepub async fn get_health_status(&self) -> SystemHealthStatus
pub async fn get_health_status(&self) -> SystemHealthStatus
Get real-time system health status
Trait Implementations§
Source§impl Clone for MetricsCollector
impl Clone for MetricsCollector
Source§fn clone(&self) -> MetricsCollector
fn clone(&self) -> MetricsCollector
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 MetricsCollector
impl Debug for MetricsCollector
Auto Trait Implementations§
impl Freeze for MetricsCollector
impl !RefUnwindSafe for MetricsCollector
impl Send for MetricsCollector
impl Sync for MetricsCollector
impl Unpin for MetricsCollector
impl !UnwindSafe for MetricsCollector
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