diff options
| author | Richard Linden <none@none> | 2013-08-21 14:06:57 -0700 |
|---|---|---|
| committer | Richard Linden <none@none> | 2013-08-21 14:06:57 -0700 |
| commit | 2c6bc5afa59a88136fd6de4ebf0cb99ea7cdef3f (patch) | |
| tree | c91e15225fc14b0ea753d8188199f8e7f806e7a5 /indra/llcommon/lltraceaccumulators.h | |
| parent | 6d9af374066421a1d8465a57795250a1614adcbb (diff) | |
SH-4433 WIP Interesting: Statistics > Ping Sim is always 0 ms
made getPrimaryAccumulator return a reference since it was an
always non-null pointer
changed unit conversion to perform lazy division in order to avoid truncation
of timer values
Diffstat (limited to 'indra/llcommon/lltraceaccumulators.h')
| -rw-r--r-- | indra/llcommon/lltraceaccumulators.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/indra/llcommon/lltraceaccumulators.h b/indra/llcommon/lltraceaccumulators.h index f9d223066d..d4ff4b8d71 100644 --- a/indra/llcommon/lltraceaccumulators.h +++ b/indra/llcommon/lltraceaccumulators.h @@ -1,3 +1,4 @@ + /** * @file lltraceaccumulators.h * @brief Storage for accumulating statistics @@ -317,6 +318,7 @@ namespace LLTrace mMin = value; mMax = value; mMean = value; + llassert(mMean < 0 || mMean >= 0); mLastSampleTimeStamp = time_stamp; } else @@ -341,6 +343,7 @@ namespace LLTrace mTotalSamplingTime += delta_time; F64 old_mean = mMean; mMean += (delta_time / mTotalSamplingTime) * (mLastValue - old_mean); + llassert(mMean < 0 || mMean >= 0); mSumOfSquares += delta_time * (mLastValue - old_mean) * (mLastValue - mMean); } mLastSampleTimeStamp = time_stamp; |
