diff --git a/indra/llcommon/lltraceaccumulators.cpp b/indra/llcommon/lltraceaccumulators.cpp index 42f075a7cb6f3e6ca422517f9bfba760199334ee..ae769350b9558545ee1829e1155de4b66c413048 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 e0f60800e3edc3b6628d09e5128820eb844ebe11..02af480b8a729c7e3769e82a6c83edb38f79828e 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 ecffc6799332d7871581fd90c4f593ae6923b61f..666fb1a0e5123ea05198bcc70c45c47766edbb66 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -283,6 +283,7 @@ void LLSceneMonitor::capture() else { mEnabled = enabled; + reset(); freezeScene(); } }