chore(exex): adjust WAL gauge metric names (#11454)

This commit is contained in:
Alexey Shekhirin
2024-10-03 16:10:07 +03:00
committed by GitHub
parent 05a7bdc9ac
commit a6b1fee539
2 changed files with 6 additions and 6 deletions

View File

@ -7,10 +7,10 @@ use reth_metrics::Metrics;
pub(super) struct Metrics {
/// Size of all notifications in WAL in bytes
pub size_bytes: Gauge,
/// Total number of notifications in WAL
pub notifications_total: Gauge,
/// Total number of committed blocks in WAL
pub committed_blocks_total: Gauge,
/// Number of notifications in WAL
pub notifications_count: Gauge,
/// Number of committed blocks in WAL
pub committed_blocks_count: Gauge,
/// Lowest committed block height in WAL
pub lowest_committed_block_height: Gauge,
/// Highest committed block height in WAL

View File

@ -167,8 +167,8 @@ impl WalInner {
fn update_metrics(&self, block_cache: &BlockCache, size_delta: i64) {
self.metrics.size_bytes.increment(size_delta as f64);
self.metrics.notifications_total.set(block_cache.notification_max_blocks.len() as f64);
self.metrics.committed_blocks_total.set(block_cache.committed_blocks.len() as f64);
self.metrics.notifications_count.set(block_cache.notification_max_blocks.len() as f64);
self.metrics.committed_blocks_count.set(block_cache.committed_blocks.len() as f64);
if let Some(lowest_committed_block_height) = block_cache.lowest_committed_block_height {
self.metrics.lowest_committed_block_height.set(lowest_committed_block_height as f64);