reth_db::database_metrics

Trait DatabaseMetrics

Source
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§

Source

fn report_metrics(&self)

Reports metrics for the database.

Source

fn gauge_metrics(&self) -> Vec<(&'static str, f64, Vec<Label>)>

Returns a list of Gauge metrics for the database.

Source

fn counter_metrics(&self) -> Vec<(&'static str, u64, Vec<Label>)>

Returns a list of Counter metrics for the database.

Source

fn histogram_metrics(&self) -> Vec<(&'static str, f64, Vec<Label>)>

Returns a list of Histogram metrics for the database.

Implementations on Foreign Types§

Source§

impl<DB> DatabaseMetrics for Arc<DB>
where DB: DatabaseMetrics,

Implementors§

Source§

impl DatabaseMetrics for DatabaseEnv

Available on crate feature mdbx only.
Source§

impl<DB: DatabaseMetrics> DatabaseMetrics for TempDatabase<DB>

Available on crate feature test-utils only.