mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-29 09:08:05 -05:00
chore: move metrics to submodule (#2265)
This commit is contained in:
14
crates/consensus/beacon/src/engine/metrics.rs
Normal file
14
crates/consensus/beacon/src/engine/metrics.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
use metrics::Counter;
|
||||
use reth_metrics_derive::Metrics;
|
||||
|
||||
/// Beacon consensus engine metrics.
|
||||
#[derive(Metrics)]
|
||||
#[metrics(scope = "consensus.engine.beacon")]
|
||||
pub(crate) struct Metrics {
|
||||
/// The number of times the pipeline was run.
|
||||
pub(crate) pipeline_runs: Counter,
|
||||
/// The total count of forkchoice updated messages received.
|
||||
pub(crate) forkchoice_updated_messages: Counter,
|
||||
/// The total count of new payload messages received.
|
||||
pub(crate) new_payload_messages: Counter,
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::engine::metrics::Metrics;
|
||||
use futures::{Future, FutureExt, StreamExt};
|
||||
use metrics::Counter;
|
||||
use reth_db::{database::Database, tables, transaction::DbTx};
|
||||
use reth_interfaces::{
|
||||
blockchain_tree::{BlockStatus, BlockchainTreeEngine},
|
||||
@@ -8,7 +8,6 @@ use reth_interfaces::{
|
||||
sync::SyncStateUpdater,
|
||||
Error,
|
||||
};
|
||||
use reth_metrics_derive::Metrics;
|
||||
use reth_payload_builder::{PayloadBuilderAttributes, PayloadBuilderHandle};
|
||||
use reth_primitives::{BlockNumber, Header, SealedBlock, H256};
|
||||
use reth_rpc_types::engine::{
|
||||
@@ -32,21 +31,10 @@ pub use error::{BeaconEngineError, BeaconEngineResult};
|
||||
mod message;
|
||||
pub use message::BeaconEngineMessage;
|
||||
|
||||
mod metrics;
|
||||
mod pipeline_state;
|
||||
pub use pipeline_state::PipelineState;
|
||||
|
||||
/// Beacon consensus engine metrics.
|
||||
#[derive(Metrics)]
|
||||
#[metrics(scope = "consensus.engine.beacon")]
|
||||
struct Metrics {
|
||||
/// The number of times the pipeline was run.
|
||||
pipeline_runs: Counter,
|
||||
/// The total count of forkchoice updated messages received.
|
||||
forkchoice_updated_messages: Counter,
|
||||
/// The total count of new payload messages received.
|
||||
new_payload_messages: Counter,
|
||||
}
|
||||
|
||||
/// The beacon consensus engine is the driver that switches between historical and live sync.
|
||||
///
|
||||
/// The beacon consensus engine is itself driven by messages from the Consensus Layer, which are
|
||||
|
||||
Reference in New Issue
Block a user