Skip to content

Commit

Permalink
fixed elapsed calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
SmaGMan committed Dec 25, 2023
1 parent 400fcc5 commit 441b683
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/validator/collator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1165,6 +1165,7 @@ impl CollatorMetrics {
self.elapsed_on_remp_processed_ms -= self.elapsed_on_empty_collations_ms;
self.elapsed_on_internals_processed_ms -= self.elapsed_on_empty_collations_ms;
self.elapsed_on_initial_clean_ms -= self.elapsed_on_empty_collations_ms;
self.elapsed_on_prepare_data_ms -= self.elapsed_on_empty_collations_ms;
}

fn save_stopped_by_timeout_on(&mut self, step: CollationStoppedOnTimeoutStep) {
Expand Down Expand Up @@ -2222,6 +2223,8 @@ impl Collator {
e
});
if result.is_err() {
#[cfg(feature = "log_metrics")]
collator_data.metrics.report_metrics();
collator_data.metrics.log_metrics(self.collated_block_descr.clone());
}
duration = attempt_started.elapsed().as_millis() as u32;
Expand Down

0 comments on commit 441b683

Please sign in to comment.