pub struct MetricsCollector { /* private fields */ }Expand description
Metrics collector for gathering system metrics
Implementations§
Source§impl MetricsCollector
impl MetricsCollector
Sourcepub async fn new(config: MonitoringConfig) -> RragResult<Self>
pub async fn new(config: MonitoringConfig) -> RragResult<Self>
Create new metrics collector
Sourcepub async fn get_current_metrics(&self) -> IncrementalMetrics
pub async fn get_current_metrics(&self) -> IncrementalMetrics
Get current metrics
Sourcepub async fn get_metrics_history(
&self,
limit: Option<usize>,
) -> Vec<IncrementalMetrics>
pub async fn get_metrics_history( &self, limit: Option<usize>, ) -> Vec<IncrementalMetrics>
Get metrics history
Sourcepub async fn update_metrics(&self, update: MetricsUpdate) -> RragResult<()>
pub async fn update_metrics(&self, update: MetricsUpdate) -> RragResult<()>
Update metrics
Sourcepub async fn record_performance(
&self,
data_point: PerformanceDataPoint,
) -> RragResult<()>
pub async fn record_performance( &self, data_point: PerformanceDataPoint, ) -> RragResult<()>
Record performance data
Sourcepub async fn get_performance_stats(&self) -> PerformanceStatistics
pub async fn get_performance_stats(&self) -> PerformanceStatistics
Get performance statistics
Sourcepub async fn health_check(&self) -> RragResult<bool>
pub async fn health_check(&self) -> RragResult<bool>
Health check
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