Skip to content

Commit 95809fe

Browse files
committed
diff output
1 parent 9702c59 commit 95809fe

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/full_check/full_check/full_check.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ func (p *FullCheck) PrintStat(finished bool) {
128128
if p.stat.ConflictKey[i][common.NoneConflict].Total() != 0 {
129129
metricStat.KeyMetric[i.String()]["equal"] = p.stat.ConflictKey[i][common.NoneConflict].Json()
130130
if p.times == p.CompareCount {
131-
fmt.Fprintf(&buf, "KeyEqualAtLast|%s|%s|%v\n", i, common.NoneConflict,
131+
fmt.Fprintf(&buf, "KeyEqualAtLast|%s|%s|%v\n", i, common.NoneConflict,
132132
p.stat.ConflictKey[i][common.NoneConflict])
133133
} else {
134-
fmt.Fprintf(&buf, "KeyEqualInProcess|%s|%s|%v\n", i, common.NoneConflict,
134+
fmt.Fprintf(&buf, "KeyEqualInProcess|%s|%s|%v\n", i, common.NoneConflict,
135135
p.stat.ConflictKey[i][common.NoneConflict])
136136
}
137137
}
@@ -416,7 +416,7 @@ func (p *FullCheck) WriteConflictKey(conflictKey <-chan *common.Key) {
416416

417417
var resultfile *os.File
418418
if len(conf.Opts.ResultFile) > 0 {
419-
resultfile, _ = os.OpenFile(conf.Opts.ResultFile, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666)
419+
resultfile, _ = os.OpenFile(conf.Opts.ResultFile, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
420420
defer resultfile.Close()
421421
}
422422

0 commit comments

Comments
 (0)