reth_trie_parallel/
proof_task_metrics.rs

1use reth_metrics::{metrics::Histogram, Metrics};
2
3/// Metrics for the proof task.
4#[derive(Clone, Metrics)]
5#[metrics(scope = "trie.proof_task")]
6pub struct ProofTaskTrieMetrics {
7    /// A histogram for the number of blinded account nodes fetched.
8    blinded_account_nodes: Histogram,
9    /// A histogram for the number of blinded storage nodes fetched.
10    blinded_storage_nodes: Histogram,
11}
12
13impl ProofTaskTrieMetrics {
14    /// Record account nodes fetched.
15    pub fn record_account_nodes(&self, count: usize) {
16        self.blinded_account_nodes.record(count as f64);
17    }
18
19    /// Record storage nodes fetched.
20    pub fn record_storage_nodes(&self, count: usize) {
21        self.blinded_storage_nodes.record(count as f64);
22    }
23}