Skip to content

Commit d8c8559

Browse files
committed
remove wrapper
1 parent 45765ac commit d8c8559

File tree

2 files changed

+5
-24
lines changed

2 files changed

+5
-24
lines changed

crates/trie/parallel/src/proof_task.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ use tokio::runtime::Handle;
6262
use tracing::trace;
6363

6464
#[cfg(feature = "metrics")]
65-
use crate::proof_task_metrics::ProofTaskMetrics;
65+
use crate::proof_task_metrics::ProofTaskTrieMetrics;
6666

6767
type StorageProofResult = Result<DecodedStorageMultiProof, ParallelStateRootError>;
6868
type TrieNodeProviderResult = Result<Option<RevealedNode>, SparseTrieError>;
@@ -117,7 +117,7 @@ fn storage_worker_loop<Tx>(
117117
proof_tx: ProofTaskTx<Tx>,
118118
work_rx: CrossbeamReceiver<StorageWorkerJob>,
119119
worker_id: usize,
120-
#[cfg(feature = "metrics")] metrics: ProofTaskMetrics,
120+
#[cfg(feature = "metrics")] metrics: ProofTaskTrieMetrics,
121121
) where
122122
Tx: DbTx,
123123
{
@@ -264,7 +264,7 @@ fn account_worker_loop<Tx>(
264264
work_rx: CrossbeamReceiver<AccountWorkerJob>,
265265
storage_work_tx: CrossbeamSender<StorageWorkerJob>,
266266
worker_id: usize,
267-
#[cfg(feature = "metrics")] metrics: ProofTaskMetrics,
267+
#[cfg(feature = "metrics")] metrics: ProofTaskTrieMetrics,
268268
) where
269269
Tx: DbTx,
270270
{
@@ -890,7 +890,7 @@ impl ProofTaskManagerHandle {
890890

891891
executor.spawn_blocking(move || {
892892
#[cfg(feature = "metrics")]
893-
let metrics = ProofTaskMetrics::default();
893+
let metrics = ProofTaskTrieMetrics::default();
894894

895895
storage_worker_loop(
896896
proof_task_tx,
@@ -918,7 +918,7 @@ impl ProofTaskManagerHandle {
918918

919919
executor.spawn_blocking(move || {
920920
#[cfg(feature = "metrics")]
921-
let metrics = ProofTaskMetrics::default();
921+
let metrics = ProofTaskTrieMetrics::default();
922922

923923
account_worker_loop(
924924
proof_task_tx,

crates/trie/parallel/src/proof_task_metrics.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
11
use reth_metrics::{metrics::Histogram, Metrics};
22

3-
/// Metrics for blinded node fetching by proof workers.
4-
#[derive(Clone, Debug, Default)]
5-
pub struct ProofTaskMetrics {
6-
/// The actual metrics for blinded nodes.
7-
pub task_metrics: ProofTaskTrieMetrics,
8-
}
9-
10-
impl ProofTaskMetrics {
11-
/// Record the blinded account node count into the histogram.
12-
pub fn record_account_nodes(&self, count: usize) {
13-
self.task_metrics.record_account_nodes(count);
14-
}
15-
16-
/// Record the blinded storage node count into the histogram.
17-
pub fn record_storage_nodes(&self, count: usize) {
18-
self.task_metrics.record_storage_nodes(count);
19-
}
20-
}
21-
223
/// Metrics for the proof task.
234
#[derive(Clone, Metrics)]
245
#[metrics(scope = "trie.proof_task")]

0 commit comments

Comments
 (0)