File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -550,6 +550,18 @@ func (this *Migrator) printStatus() {
550550 eta := "N/A"
551551 if isThrottled , throttleReason := this .migrationContext .IsThrottled (); isThrottled {
552552 eta = fmt .Sprintf ("throttled, %s" , throttleReason )
553+ } else if progressPct > 100.0 {
554+ eta = "Due"
555+ } else if progressPct >= 2.0 {
556+ elapsedRowCopySeconds := this .migrationContext .ElapsedRowCopyTime ().Seconds ()
557+ totalExpectedSeconds := elapsedRowCopySeconds * float64 (rowsEstimate ) / float64 (totalRowsCopied )
558+ etaSeconds := totalExpectedSeconds - elapsedRowCopySeconds
559+ etaDuration := time .Duration (etaSeconds ) * time .Second
560+ if etaDuration >= 0 {
561+ eta = base .PrettifyDurationOutput (etaDuration )
562+ } else {
563+ eta = "Due"
564+ }
553565 }
554566 status := fmt .Sprintf ("Copy: %d/%d %.1f%%; Applied: %d; Backlog: %d/%d; Elapsed: %+v(copy), %+v(total); ETA: %s" ,
555567 totalRowsCopied , rowsEstimate , progressPct ,
You can’t perform that action at this time.
0 commit comments