pub struct MetricsExporter;
Expand description
Metrics exporter for different formats
Implementations§
Source§impl MetricsExporter
impl MetricsExporter
Sourcepub fn to_json(stats: &PerformanceStats) -> Result<String>
pub fn to_json(stats: &PerformanceStats) -> Result<String>
Export metrics as JSON
Sourcepub fn to_prometheus(metrics: &HashMap<String, f64>) -> String
pub fn to_prometheus(metrics: &HashMap<String, f64>) -> String
Export metrics as Prometheus format
Sourcepub fn to_csv(samples: &[PerformanceSample]) -> String
pub fn to_csv(samples: &[PerformanceSample]) -> String
Export metrics as CSV
Auto Trait Implementations§
impl Freeze for MetricsExporter
impl RefUnwindSafe for MetricsExporter
impl Send for MetricsExporter
impl Sync for MetricsExporter
impl Unpin for MetricsExporter
impl UnwindSafe for MetricsExporter
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