Skip to content

Commit

Permalink
fix now count
Browse files Browse the repository at this point in the history
  • Loading branch information
virajbhartiya committed Nov 28, 2024
1 parent 1d895bd commit 89fbc78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions builtin/v9/migration/top.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ func MigrateStateTree(ctx context.Context, store cbor.IpldStore, newManifestCID
for {
select {
case <-time.After(cfg.ProgressLogPeriod):
jobsNow := atomic.LoadUint32(&jobCount) // Snapshot values to avoid incorrect-looking arithmetic if they change.
doneNow := atomic.LoadUint32(&doneCount)
jobsNow := jobCount // Snapshot values to avoid incorrect-looking arithmetic if they change.
doneNow := doneCount
elapsed := time.Since(startTime)
rate := float64(doneNow) / elapsed.Seconds()
percentComplete := float64(doneNow) / float64(jobsNow) * 100
Expand Down

0 comments on commit 89fbc78

Please sign in to comment.