reth_trie_sparse_parallel/
metrics.rs

1//! Metrics for the parallel sparse trie
2use reth_metrics::{metrics::Histogram, Metrics};
3
4/// Metrics for the parallel sparse trie
5#[derive(Metrics, Clone)]
6#[metrics(scope = "parallel_sparse_trie")]
7pub(crate) struct ParallelSparseTrieMetrics {
8    /// A histogram for the number of subtries updated when calculating hashes.
9    pub(crate) subtries_updated: Histogram,
10    /// A histogram for the time it took to update lower subtrie hashes.
11    pub(crate) subtrie_hash_update_latency: Histogram,
12    /// A histogram for the time it took to update the upper subtrie hashes.
13    pub(crate) subtrie_upper_hash_latency: Histogram,
14}
15
16impl PartialEq for ParallelSparseTrieMetrics {
17    fn eq(&self, _other: &Self) -> bool {
18        // It does not make sense to compare metrics, so return true, all are equal
19        true
20    }
21}
22
23impl Eq for ParallelSparseTrieMetrics {}