Address review comments

This commit is contained in:
Michael Eischer committed 2023-06-08 20:24:21 +02:00
1 parent 0372c7ef04
commit 0b908bb1fb
4 files changed
+42 -67

No files matched your search

+2 -1
View File
@@ -76,7 +76,8 @@ func NewProgress(printer ProgressPrinter, interval time.Duration) *Progress {
var secondsRemaining uint64
if p.scanFinished {
rate := p.estimator.rate(time.Now())
if rate <= 0 {
tooSlowCutoff := 1024.
if rate <= tooSlowCutoff {
secondsRemaining = 0
} else {
todo := float64(p.total.Bytes - p.processed.Bytes)