diff --git a/node/libs/storage/src/block_store/metrics.rs b/node/libs/storage/src/block_store/metrics.rs index 04f87bd0..3c3107ab 100644 --- a/node/libs/storage/src/block_store/metrics.rs +++ b/node/libs/storage/src/block_store/metrics.rs @@ -13,9 +13,12 @@ pub(super) struct PersistentBlockStore { /// Latency of a successful `block()` call. #[metrics(unit = vise::Unit::Seconds, buckets = vise::Buckets::LATENCIES)] pub(super) block_latency: vise::Histogram, - /// Latency of a successful `store_next_block()` call. + /// Latency of a successful `queue_next_block()` call. #[metrics(unit = vise::Unit::Seconds, buckets = vise::Buckets::LATENCIES)] pub(super) queue_next_block_latency: vise::Histogram, + /// Latency of a successful `verify_pre_genesis_block()` call. + #[metrics(unit = vise::Unit::Seconds, buckets = vise::Buckets::LATENCIES)] + pub(super) verify_pre_genesis_block_latency: vise::Histogram, } #[vise::register] diff --git a/node/libs/storage/src/block_store/mod.rs b/node/libs/storage/src/block_store/mod.rs index e154de27..afb2f656 100644 --- a/node/libs/storage/src/block_store/mod.rs +++ b/node/libs/storage/src/block_store/mod.rs @@ -339,11 +339,12 @@ impl BlockStore { ) .into()); } - // TODO: metrics + let t = metrics::PERSISTENT_BLOCK_STORE.verify_pre_genesis_block_latency.start(); self.persistent .verify_pre_genesis_block(ctx, b) .await .context("verify_pre_genesis_block()")?; + t.observe(); } } Ok(())