reth_engine_tree/
metrics.rs

1use reth_metrics::{
2    metrics::{Gauge, Histogram},
3    Metrics,
4};
5
6/// Metrics for the `BasicBlockDownloader`.
7#[derive(Metrics)]
8#[metrics(scope = "consensus.engine.beacon")]
9pub(crate) struct BlockDownloaderMetrics {
10    /// How many blocks are currently being downloaded.
11    pub(crate) active_block_downloads: Gauge,
12}
13
14/// Metrics for the `PersistenceService`
15#[derive(Metrics)]
16#[metrics(scope = "consensus.engine.persistence")]
17pub(crate) struct PersistenceMetrics {
18    /// How long it took for blocks to be removed
19    pub(crate) remove_blocks_above_duration_seconds: Histogram,
20    /// How long it took for blocks to be saved
21    pub(crate) save_blocks_duration_seconds: Histogram,
22    /// How long it took for blocks to be pruned
23    pub(crate) prune_before_duration_seconds: Histogram,
24}