Keep 1's from getting stuck in the load monitor stats.

This commit is contained in:
JoelKatz
2012-11-19 21:01:37 -08:00
parent 11088937a4
commit 145a7d8df0

View File

@@ -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);