mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(metrics): restructure crates (#2850)
This commit is contained in:
@ -13,7 +13,7 @@ reth-interfaces = { path = "../../interfaces" }
|
||||
reth-primitives = { path = "../../primitives" }
|
||||
reth-db = { path = "../../storage/db" }
|
||||
reth-tasks = { path = "../../tasks" }
|
||||
reth-metrics-derive = { path = "../../metrics/metrics-derive" }
|
||||
reth-metrics = { path = "../../metrics" }
|
||||
|
||||
# async
|
||||
futures = "0.3"
|
||||
@ -25,7 +25,6 @@ tokio-util = { version = "0.7", features = ["codec"] }
|
||||
|
||||
# misc
|
||||
tracing = { workspace = true }
|
||||
metrics = "0.20.1"
|
||||
rayon = "1.6.0"
|
||||
|
||||
# optional deps for the test-utils feature
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
use metrics::{Counter, Gauge};
|
||||
use reth_interfaces::p2p::error::DownloadError;
|
||||
use reth_metrics_derive::Metrics;
|
||||
use reth_metrics::{
|
||||
metrics::{self, Counter, Gauge},
|
||||
Metrics,
|
||||
};
|
||||
|
||||
/// Common downloader metrics.
|
||||
///
|
||||
|
||||
@ -17,6 +17,7 @@ reth-codecs = { path = "../../storage/codecs" }
|
||||
reth-primitives = { path = "../../primitives" }
|
||||
reth-ecies = { path = "../ecies" }
|
||||
reth-rlp = { path = "../../rlp", features = ["alloc", "derive", "std", "ethereum-types", "smol_str"] }
|
||||
reth-metrics = { path = "../../metrics" }
|
||||
|
||||
# used for Chain and builders
|
||||
ethers-core = { version = "2.0.4", default-features = false}
|
||||
@ -29,7 +30,6 @@ pin-project = "1.0"
|
||||
tracing = { workspace = true }
|
||||
snap = "1.0.5"
|
||||
smol_str = "0.1"
|
||||
metrics = "0.20.1"
|
||||
async-trait = "0.1"
|
||||
|
||||
# arbitrary utils
|
||||
|
||||
@ -7,9 +7,9 @@ use crate::{
|
||||
DisconnectReason, HelloMessage,
|
||||
};
|
||||
use futures::{Sink, SinkExt, StreamExt};
|
||||
use metrics::counter;
|
||||
use pin_project::pin_project;
|
||||
use reth_codecs::derive_arbitrary;
|
||||
use reth_metrics::metrics::{self, counter};
|
||||
use reth_primitives::{
|
||||
bytes::{Buf, BufMut, Bytes, BytesMut},
|
||||
hex,
|
||||
|
||||
@ -30,7 +30,7 @@ reth-rlp-derive = { path = "../../rlp/rlp-derive" }
|
||||
reth-tasks = { path = "../../tasks" }
|
||||
reth-transaction-pool = { path = "../../transaction-pool" }
|
||||
reth-provider = { path = "../../storage/provider"}
|
||||
reth-metrics-common = { path = "../../metrics/common" }
|
||||
reth-metrics = { path = "../../metrics", features = ["common"] }
|
||||
reth-rpc-types = { path = "../../rpc/rpc-types" }
|
||||
|
||||
# async/futures
|
||||
@ -45,10 +45,6 @@ serde = { version = "1.0", optional = true }
|
||||
humantime-serde = { version = "1.1", optional = true }
|
||||
serde_json = { version = "1.0", optional = true }
|
||||
|
||||
# metrics
|
||||
metrics = "0.20.1"
|
||||
reth-metrics-derive = { path = "../../metrics/metrics-derive" }
|
||||
|
||||
# misc
|
||||
auto_impl = "1"
|
||||
aquamarine = "0.3.0"
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
use metrics::{Counter, Gauge};
|
||||
use reth_eth_wire::DisconnectReason;
|
||||
use reth_metrics_derive::Metrics;
|
||||
use reth_metrics::{
|
||||
metrics::{self, Counter, Gauge},
|
||||
Metrics,
|
||||
};
|
||||
|
||||
/// Metrics for the entire network, handled by NetworkManager
|
||||
#[derive(Metrics)]
|
||||
|
||||
@ -19,7 +19,7 @@ use reth_eth_wire::{
|
||||
DisconnectReason, EthMessage, EthStream, P2PStream,
|
||||
};
|
||||
use reth_interfaces::p2p::error::RequestError;
|
||||
use reth_metrics_common::metered_sender::MeteredSender;
|
||||
use reth_metrics::common::metered_sender::MeteredSender;
|
||||
use reth_net_common::bandwidth_meter::MeteredStream;
|
||||
use reth_primitives::PeerId;
|
||||
use std::{
|
||||
|
||||
@ -19,7 +19,7 @@ use reth_eth_wire::{
|
||||
errors::EthStreamError,
|
||||
DisconnectReason, EthVersion, HelloMessage, Status, UnauthedEthStream, UnauthedP2PStream,
|
||||
};
|
||||
use reth_metrics_common::metered_sender::MeteredSender;
|
||||
use reth_metrics::common::metered_sender::MeteredSender;
|
||||
use reth_net_common::{
|
||||
bandwidth_meter::{BandwidthMeter, MeteredStream},
|
||||
stream::HasRemoteAddr,
|
||||
|
||||
Reference in New Issue
Block a user