Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
summary: fix restore files count miss (#270)
Browse files Browse the repository at this point in the history
Co-authored-by: Neil Shen <overvenus@gmail.com>
  • Loading branch information
3pointer and overvenus authored May 14, 2020
1 parent c4fbcbd commit a28413a
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions pkg/summary/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,10 @@ func (tc *logCollector) CollectSuccessUnit(name string, unitCount int, arg inter

switch v := arg.(type) {
case time.Duration:
if _, ok := tc.successCosts[name]; !ok {
tc.successCosts[name] = v
tc.successUnitCount += unitCount
} else {
tc.successCosts[name] += v
}
tc.successUnitCount += unitCount
tc.successCosts[name] += v
case uint64:
if _, ok := tc.successData[name]; !ok {
tc.successData[name] = v
} else {
tc.successData[name] += v
}
tc.successData[name] += v
}
}

Expand Down

0 comments on commit a28413a

Please sign in to comment.