Skip to content

Commit

Permalink
br: enhance the output infomation (#36676)
Browse files Browse the repository at this point in the history
ref #29501
  • Loading branch information
joccau authored Jul 29, 2022
1 parent 6b83cdb commit 7a47538
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions br/pkg/task/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -1040,9 +1040,15 @@ func restoreStream(
if err != nil {
summary.Log("restore log failed summary", zap.Error(err))
} else {
summary.Log("restore log success summary", zap.Duration("total-take", time.Since(startTime)),
totalDureTime := time.Since(startTime)
summary.Log("restore log success summary", zap.Duration("total-take", totalDureTime),
zap.Uint64("restore-from", cfg.StartTS), zap.Uint64("restore-to", cfg.RestoreTS),
zap.Uint64("total-kv-count", totalKVCount), zap.Uint64("total-size", totalSize))
zap.String("restore-from", stream.FormatDate(oracle.GetTimeFromTS(cfg.StartTS))),
zap.String("restore-to", stream.FormatDate(oracle.GetTimeFromTS(cfg.RestoreTS))),
zap.Uint64("total-kv-count", totalKVCount),
zap.String("total-size", units.HumanSize(float64(totalSize))),
zap.String("average-speed", units.HumanSize(float64(totalSize)/float64(totalDureTime.Seconds()))+"/s"),
)
}
}()

Expand Down
1 change: 1 addition & 0 deletions build/nogo_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@
"/cgo/": "no need to vet third party code for cgo",
"br/pkg/lightning/common/conn.go": "ignore: to fix it",
"br/pkg/lightning/common/storage_unix.go": "ignore: to fix it",
"br/pkg/task/common.go": "ignore: to fix it",
".*_generated\\.go$": "ignore generated code"
}
},
Expand Down

0 comments on commit 7a47538

Please sign in to comment.