From 00a6dbbe9798d6322623f034e9945230c77d5b9f Mon Sep 17 00:00:00 2001 From: Cameron Sparr Date: Thu, 3 Dec 2015 16:23:49 -0700 Subject: [PATCH] cpu plugin: update LastStats before returning fixes #388 --- plugins/system/cpu.go | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/system/cpu.go b/plugins/system/cpu.go index 2655a1ed6..38e4ad6d7 100644 --- a/plugins/system/cpu.go +++ b/plugins/system/cpu.go @@ -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") }