Skip to content

Commit

Permalink
cpu plugin: update LastStats before returning
Browse files Browse the repository at this point in the history
fixes #388
  • Loading branch information
sparrc committed Dec 3, 2015
1 parent 4cf47dc commit 00a6dbb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugins/system/cpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func (s *CPUStats) Gather(acc plugins.Accumulator) error {
totalDelta := total - lastTotal

if totalDelta < 0 {
s.lastStats = times
return fmt.Errorf("Error: current total CPU time is less than previous total CPU time")
}

Expand Down

0 comments on commit 00a6dbb

Please sign in to comment.