Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

br: enhance the output infomation (#36676) #36706

Merged
merged 2 commits into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
3 changes: 3 additions & 0 deletions build/nogo_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@
".*\\.pb\\.go$": "generated code",
"parser/parser.go": "generated code",
"/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