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 31, 2023
1 parent 14650e6 commit 83465f1
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 @@ -1163,6 +1163,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 @@ -2219,6 +2220,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 83465f1

Please sign in to comment.