feat: enable prewarm spawn metrics (#14229)

This commit is contained in:
Dan Cline
2025-02-05 09:17:46 -05:00
committed by GitHub
parent 49b6ae0dc4
commit 29e6e5cd5e
2 changed files with 2 additions and 1 deletions

View File

@ -70,7 +70,6 @@ pub(crate) struct BlockValidationMetrics {
/// Trie input computation duration /// Trie input computation duration
pub(crate) trie_input_duration: Gauge, pub(crate) trie_input_duration: Gauge,
/// Prewarm spawn duration /// Prewarm spawn duration
#[allow(dead_code)]
pub(crate) prewarm_spawn_duration: Gauge, pub(crate) prewarm_spawn_duration: Gauge,
/// Cache saving duration /// Cache saving duration
#[allow(dead_code)] #[allow(dead_code)]

View File

@ -2455,6 +2455,8 @@ where
drop(state_root_sender); drop(state_root_sender);
let elapsed = prewarm_start.elapsed(); let elapsed = prewarm_start.elapsed();
debug!(target: "engine::tree", ?elapsed, "Done spawning prewarm threads"); debug!(target: "engine::tree", ?elapsed, "Done spawning prewarm threads");
self.metrics.block_validation.prewarm_spawn_duration.set(elapsed.as_secs_f64());
} }
trace!(target: "engine::tree", block=?block_num_hash, "Executing block"); trace!(target: "engine::tree", block=?block_num_hash, "Executing block");