reth_beacon_consensus/engine/
metrics.rs

1use reth_metrics::{
2    metrics::{Counter, Gauge, Histogram},
3    Metrics,
4};
5
6/// Beacon consensus engine metrics.
7#[derive(Metrics)]
8#[metrics(scope = "consensus.engine.beacon")]
9pub(crate) struct EngineMetrics {
10    /// The number of times the pipeline was run.
11    pub(crate) pipeline_runs: Counter,
12    /// The total count of forkchoice updated messages received.
13    pub(crate) forkchoice_updated_messages: Counter,
14    /// The total count of new payload messages received.
15    pub(crate) new_payload_messages: Counter,
16    /// Latency for making canonical already canonical block
17    pub(crate) make_canonical_already_canonical_latency: Histogram,
18    /// Latency for making canonical committed block
19    pub(crate) make_canonical_committed_latency: Histogram,
20    /// Latency for making canonical returns error
21    pub(crate) make_canonical_error_latency: Histogram,
22    /// Latency for all making canonical results
23    pub(crate) make_canonical_latency: Histogram,
24}
25
26/// Metrics for the `EngineSyncController`.
27#[derive(Metrics)]
28#[metrics(scope = "consensus.engine.beacon")]
29pub(crate) struct EngineSyncMetrics {
30    /// How many blocks are currently being downloaded.
31    pub(crate) active_block_downloads: Gauge,
32}