Commit 5924e064 authored by szh's avatar szh

add cost

parent 74e3e490
......@@ -144,6 +144,10 @@ func backup() error {
}
func SafeBackup() error {
s := time.Now()
defer func() {
tlog.Info("SafeBackup","cost",time.Since(s))
}()
var buf bytes.Buffer
backup := exec.Command("cp","-r",btyPath+"/datadir",btyPath+"/datadir_backup")
backup.Stderr = &buf
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment