progress is 100% when 0/0 rows copied
This commit is contained in:
parent
d9ae2f3942
commit
7e9f578e12
@ -941,7 +941,9 @@ func (this *Migrator) printStatus(rule PrintStatusRule, writers ...io.Writer) {
|
||||
totalRowsCopied := this.migrationContext.GetTotalRowsCopied()
|
||||
rowsEstimate := atomic.LoadInt64(&this.migrationContext.RowsEstimate)
|
||||
var progressPct float64
|
||||
if rowsEstimate > 0 {
|
||||
if rowsEstimate == 0 {
|
||||
progressPct = 100.0
|
||||
} else {
|
||||
progressPct = 100.0 * float64(totalRowsCopied) / float64(rowsEstimate)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user