pub struct MetricsStorage { /* private fields */ }Expand description
Internal metrics storage shared by Counter, Histogram, Gauge.
Implementations§
Source§impl MetricsStorage
impl MetricsStorage
Sourcepub fn increment_counter(&self, name: &str, delta: u64)
pub fn increment_counter(&self, name: &str, delta: u64)
Increment a counter metric.
Sourcepub fn record_histogram(&self, name: &str, value: f64)
pub fn record_histogram(&self, name: &str, value: f64)
Record a histogram value.
Sourcepub fn get(&self, name: &str) -> Option<MetricValue>
pub fn get(&self, name: &str) -> Option<MetricValue>
Get a metric value by name.
Sourcepub fn list_names(&self) -> Vec<String>
pub fn list_names(&self) -> Vec<String>
List all metric names.
Trait Implementations§
Source§impl Debug for MetricsStorage
impl Debug for MetricsStorage
Source§impl Default for MetricsStorage
impl Default for MetricsStorage
Source§fn default() -> MetricsStorage
fn default() -> MetricsStorage
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for MetricsStorage
impl !RefUnwindSafe for MetricsStorage
impl Send for MetricsStorage
impl Sync for MetricsStorage
impl Unpin for MetricsStorage
impl UnsafeUnpin for MetricsStorage
impl UnwindSafe for MetricsStorage
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