diff options
-rw-r--r-- | indra/llcommon/lltraceaccumulators.cpp | 3 | ||||
-rw-r--r-- | indra/llcommon/lltraceaccumulators.h | 5 | ||||
-rw-r--r-- | indra/newview/llscenemonitor.cpp | 1 |
3 files changed, 3 insertions, 6 deletions
diff --git a/indra/llcommon/lltraceaccumulators.cpp b/indra/llcommon/lltraceaccumulators.cpp index 42f075a7cb..ae769350b9 100644 --- a/indra/llcommon/lltraceaccumulators.cpp +++ b/indra/llcommon/lltraceaccumulators.cpp @@ -145,7 +145,7 @@ void SampleAccumulator::addSamples( const SampleAccumulator& other, EBufferAppen F64 epsilon = 0.0000001; - if (other.mTotalSamplingTime > epsilon) + if (other.mTotalSamplingTime > epsilon && mTotalSamplingTime > epsilon) { // combine variance (and hence standard deviation) of 2 different sized sample groups using // the following formula: http://www.mrc-bsu.cam.ac.uk/cochrane/handbook/chapter_7/7_7_3_8_combining_groups.htm @@ -173,7 +173,6 @@ void SampleAccumulator::addSamples( const SampleAccumulator& other, EBufferAppen mNumSamples += other.mNumSamples; mTotalSamplingTime += other.mTotalSamplingTime; mMean = (mMean * weight) + (other.mMean * (1.0 - weight)); - llassert(mMean < 0 || mMean >= 0); } if (append_type == SEQUENTIAL) { diff --git a/indra/llcommon/lltraceaccumulators.h b/indra/llcommon/lltraceaccumulators.h index e0f60800e3..02af480b8a 100644 --- a/indra/llcommon/lltraceaccumulators.h +++ b/indra/llcommon/lltraceaccumulators.h @@ -318,7 +318,6 @@ namespace LLTrace mMin = value; mMax = value; mMean = value; - llassert(mMean < 0 || mMean >= 0); mLastSampleTimeStamp = time_stamp; } else @@ -336,15 +335,13 @@ namespace LLTrace void sync(F64SecondsImplicit time_stamp) { - if (mHasValue) + if (mHasValue && time_stamp != mLastSampleTimeStamp) { F64SecondsImplicit delta_time = time_stamp - mLastSampleTimeStamp; mSum += mLastValue * delta_time; mTotalSamplingTime += delta_time; F64 old_mean = mMean; - llassert(mMean < 0 || mMean >= 0); mMean += (delta_time / mTotalSamplingTime) * (mLastValue - old_mean); - llassert(mMean < 0 || mMean >= 0); mSumOfSquares += delta_time * (mLastValue - old_mean) * (mLastValue - mMean); } mLastSampleTimeStamp = time_stamp; diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index ecffc67993..666fb1a0e5 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -283,6 +283,7 @@ void LLSceneMonitor::capture() else { mEnabled = enabled; + reset(); freezeScene(); } } |