From 145a7d8df0eafb81f659c7850dd013b61d8af8b5 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 19 Nov 2012 21:01:37 -0800 Subject: [PATCH] Keep 1's from getting stuck in the load monitor stats. --- src/cpp/ripple/LoadMonitor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpp/ripple/LoadMonitor.cpp b/src/cpp/ripple/LoadMonitor.cpp index 55470eab7..2b4ab5dfb 100644 --- a/src/cpp/ripple/LoadMonitor.cpp +++ b/src/cpp/ripple/LoadMonitor.cpp @@ -20,8 +20,8 @@ void LoadMonitor::LoadMonitor::update() do { // do exponential decay ++mLastUpdate; - mCounts -= (mCounts / 4); - mLatencyEvents -= (mLatencyEvents / 4); + mCounts -= ((mCounts + 3) / 4); + mLatencyEvents -= ((mLatencyEvents + 3) / 4); mLatencyMSAvg -= (mLatencyMSAvg / 4); mLatencyMSPeak -= (mLatencyMSPeak / 4); } while (mLastUpdate < now);