Skip to content

Commit

Permalink
metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
pompon0 committed Sep 30, 2024
1 parent ae5b6b4 commit 4fdeaba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion node/libs/storage/src/block_store/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<time::Duration>,
/// 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<time::Duration>,
/// 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<time::Duration>,
}

#[vise::register]
Expand Down
3 changes: 2 additions & 1 deletion node/libs/storage/src/block_store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
Expand Down

0 comments on commit 4fdeaba

Please sign in to comment.