From 48d11f0a5c47417856d048e910cebeefb14fdb44 Mon Sep 17 00:00:00 2001 From: Cameron Sparr Date: Wed, 28 Oct 2015 10:44:09 -0600 Subject: [PATCH] Mongostat diff bug, less equal to less --- plugins/mongodb/mongostat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mongodb/mongostat.go b/plugins/mongodb/mongostat.go index 585512d88..891622bd8 100644 --- a/plugins/mongodb/mongostat.go +++ b/plugins/mongodb/mongostat.go @@ -368,7 +368,7 @@ func computeLockDiffs(prevLocks, curLocks map[string]LockUsage) []LockUsage { func diff(newVal, oldVal, sampleTime int64) int64 { d := newVal - oldVal - if d <= 0 { + if d < 0 { d = newVal } return d / sampleTime