Trait DatabaseMetrics
pub trait DatabaseMetrics {
// Provided methods
fn report_metrics(&self) { ... }
fn gauge_metrics(&self) -> Vec<(&'static str, f64, Vec<Label>)> { ... }
fn counter_metrics(&self) -> Vec<(&'static str, u64, Vec<Label>)> { ... }
fn histogram_metrics(&self) -> Vec<(&'static str, f64, Vec<Label>)> { ... }
}
Expand description
Represents a type that can report metrics, used mainly with the database. The report_metrics
method can be used as a prometheus hook.
Provided Methods§
fn report_metrics(&self)
fn report_metrics(&self)
Reports metrics for the database.
fn gauge_metrics(&self) -> Vec<(&'static str, f64, Vec<Label>)>
fn gauge_metrics(&self) -> Vec<(&'static str, f64, Vec<Label>)>
Returns a list of Gauge metrics for the database.
Implementations on Foreign Types§
§impl<DB> DatabaseMetrics for Arc<DB>where
DB: DatabaseMetrics,
impl<DB> DatabaseMetrics for Arc<DB>where
DB: DatabaseMetrics,
fn report_metrics(&self)
Implementors§
impl DatabaseMetrics for DatabaseEnv
Available on crate feature
mdbx
only.impl<DB: DatabaseMetrics> DatabaseMetrics for TempDatabase<DB>
Available on crate feature
test-utils
only.