pub struct DefaultMetricsCollector { /* private fields */ }Expand description
Default metrics collector implementation
Implementations§
Trait Implementations§
Source§impl MetricsCollector for DefaultMetricsCollector
impl MetricsCollector for DefaultMetricsCollector
Source§fn start_collection(&mut self) -> RragResult<()>
fn start_collection(&mut self) -> RragResult<()>
Start collecting metrics
Source§fn stop_collection(&mut self) -> RragResult<()>
fn stop_collection(&mut self) -> RragResult<()>
Stop collecting metrics
Source§fn record_metric(
&mut self,
name: &str,
value: f32,
labels: Option<&HashMap<String, String>>,
) -> RragResult<()>
fn record_metric( &mut self, name: &str, value: f32, labels: Option<&HashMap<String, String>>, ) -> RragResult<()>
Record a metric
Source§fn get_metrics(&self) -> RragResult<HashMap<String, Vec<MetricRecord>>>
fn get_metrics(&self) -> RragResult<HashMap<String, Vec<MetricRecord>>>
Get collected metrics
Source§fn export_metrics(
&self,
format: &ExportFormat,
output_path: &str,
) -> RragResult<()>
fn export_metrics( &self, format: &ExportFormat, output_path: &str, ) -> RragResult<()>
Export metrics to file
Auto Trait Implementations§
impl Freeze for DefaultMetricsCollector
impl RefUnwindSafe for DefaultMetricsCollector
impl Send for DefaultMetricsCollector
impl Sync for DefaultMetricsCollector
impl Unpin for DefaultMetricsCollector
impl UnwindSafe for DefaultMetricsCollector
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