2007-07-15 zzz

* Add current values to graph legends
    * Fix up previous Rate fix to check for divide by zero
This commit is contained in:
zzz
2007-07-15 18:34:33 +00:00
committed by zzz
parent 4acd2996c5
commit 5c1dc79767
5 changed files with 23 additions and 11 deletions

View File

@@ -202,8 +202,11 @@ public class Rate {
_lastEventCount = (long) (0.499999 + (_currentEventCount / periodFactor));
_lastTotalEventTime = (long) (_currentTotalEventTime / periodFactor);
_lastCoalesceDate = now;
correctedTotalValue = _currentTotalValue *
(_lastEventCount / (double) _currentEventCount);
if (_currentEventCount == 0)
correctedTotalValue = 0;
else
correctedTotalValue = _currentTotalValue *
(_lastEventCount / (double) _currentEventCount);
if (_lastTotalValue > _extremeTotalValue) {
_extremeTotalValue = _lastTotalValue;