dont panic on migrations that take <1s
This commit is contained in:
parent
35ac15dd84
commit
0d5283ab46
|
@ -166,9 +166,11 @@ impl Migrator {
|
||||||
let elapsed = started_at.elapsed();
|
let elapsed = started_at.elapsed();
|
||||||
info!("Migration finished in {elapsed:?}");
|
info!("Migration finished in {elapsed:?}");
|
||||||
|
|
||||||
let throughput =
|
if let Some(throughput) =
|
||||||
(total_read_bytes.load(Ordering::SeqCst) / 1024 / 1024) / (elapsed.as_secs());
|
(total_read_bytes.load(Ordering::SeqCst) / 1024 / 1024).checked_div(elapsed.as_secs())
|
||||||
info!("Average migration speed: {throughput} MiB/s");
|
{
|
||||||
|
info!("Average migration speed: {throughput} MiB/s");
|
||||||
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue