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

summary: fix restore files count miss (#270) #281

Merged
merged 3 commits into from
May 14, 2020
Merged
Changes from 2 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
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