Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metric to measure the time it takes to gather enough assignments #4587

Merged
merged 9 commits into from
May 28, 2024
Prev Previous commit
Add trace log
Signed-off-by: Alexandru Gheorghe <[email protected]>
  • Loading branch information
alexggh committed May 28, 2024
commit 33115d549648bf0001916bdff119e7a69c023d6d
8 changes: 8 additions & 0 deletions polkadot/node/core/approval-voting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,14 @@ impl State {
let time_to_gather =
self.mark_gathered_enough_assignments(block_number, block_hash, candidate_hash);
if let Some(gathering_started) = time_to_gather.stage_start {
if gathering_started.elapsed().as_millis() > 6000 {
gum::trace!(
target: LOG_TARGET,
?block_hash,
?candidate_hash,
"Long assignment gathering time",
);
}
metrics.observe_assignment_gathering_time(
time_to_gather.stage,
gathering_started.elapsed().as_millis() as usize,
Expand Down
Loading