This repository was archived by the owner on Jan 22, 2025. It is now read-only.
File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -718,6 +718,7 @@ struct MultiThreadProgress<'a> {
718
718
report_delay_secs: u64,
719
719
first_caller: bool,
720
720
ultimate_count: u64,
721
+ start_time: Instant,
721
722
}
722
723
723
724
impl<'a> MultiThreadProgress<'a> {
@@ -729,6 +730,7 @@ impl<'a> MultiThreadProgress<'a> {
729
730
report_delay_secs,
730
731
first_caller: false,
731
732
ultimate_count,
733
+ start_time: Instant::now(),
732
734
}
733
735
}
734
736
fn report(&mut self, my_current_count: u64) {
@@ -745,11 +747,13 @@ impl<'a> MultiThreadProgress<'a> {
745
747
self.first_caller =
746
748
self.first_caller || 0 == previous_total_processed_slots_across_all_threads;
747
749
if self.first_caller {
750
+ let total = previous_total_processed_slots_across_all_threads
751
+ + my_total_newly_processed_slots_since_last_report;
748
752
info!(
749
- "generating index: {}/{} slots...",
750
- previous_total_processed_slots_across_all_threads
751
- + my_total_newly_processed_slots_since_last_report ,
752
- self.ultimate_count
753
+ "generating index: {}/{} slots... ({}/s) ",
754
+ total,
755
+ self.ultimate_count ,
756
+ total / self.start_time.elapsed().as_secs().max(1),
753
757
);
754
758
}
755
759
self.last_update = now;
You can’t perform that action at this time.
0 commit comments