Compare commits

...

1 Commits

Author SHA1 Message Date
Arsenii Kulikov
e78130afce wip 2026-01-23 16:34:23 +04:00
2 changed files with 6 additions and 0 deletions

View File

@@ -587,6 +587,8 @@ pub(crate) struct MultiProofTaskMetrics {
pub first_update_wait_time_histogram: Histogram,
/// Total time spent waiting for the last proof result.
pub last_proof_wait_time_histogram: Histogram,
/// Total time spent idle waiting for updates in sparse trie task.
pub sparse_trie_idle_duration_histogram: Histogram,
}
/// Standalone task that receives a transaction state stream and updates relevant

View File

@@ -81,8 +81,10 @@ where
let now = Instant::now();
let mut num_iterations = 0;
let mut idle_start = Instant::now();
while let Ok(mut update) = self.updates.recv() {
self.metrics.sparse_trie_idle_duration_histogram.record(idle_start.elapsed());
num_iterations += 1;
let mut num_updates = 1;
let _enter =
@@ -111,6 +113,8 @@ where
})?;
self.metrics.sparse_trie_update_duration_histogram.record(elapsed);
trace!(target: "engine::root", ?elapsed, num_iterations, "Root calculation completed");
idle_start = Instant::now();
}
debug!(target: "engine::root", num_iterations, "All proofs processed, ending calculation");