diff options
author | Richard Linden <none@none> | 2013-10-21 14:22:21 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-10-21 14:22:21 -0700 |
commit | 1dfba44b3dc14564c99333dedb7a380a160aee44 (patch) | |
tree | f22164d84706d8d3771632a4eed55ff95e298d7d /indra/llcommon/lltraceaccumulators.h | |
parent | 54c9aba3d980b6cee4c8025bafe381ea16638d34 (diff) |
fixed things so that trace recordings can be read from even while active
Diffstat (limited to 'indra/llcommon/lltraceaccumulators.h')
-rw-r--r-- | indra/llcommon/lltraceaccumulators.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/llcommon/lltraceaccumulators.h b/indra/llcommon/lltraceaccumulators.h index 2971907849..dfa037d7c0 100644 --- a/indra/llcommon/lltraceaccumulators.h +++ b/indra/llcommon/lltraceaccumulators.h @@ -276,6 +276,9 @@ namespace LLTrace S32 getSampleCount() const { return mNumSamples; } bool hasValue() const { return mNumSamples > 0; } + // helper utility to calculate combined sumofsquares total + static F64 mergeSumsOfSquares(const EventAccumulator& a, const EventAccumulator& b); + private: F64 mSum, mLastValue; @@ -359,10 +362,13 @@ namespace LLTrace F64 getMean() const { return mMean; } F64 getStandardDeviation() const { return sqrtf(mSumOfSquares / mTotalSamplingTime); } F64 getSumOfSquares() const { return mSumOfSquares; } - F64SecondsImplicit getSamplingTime() { return mTotalSamplingTime; } + F64SecondsImplicit getSamplingTime() const { return mTotalSamplingTime; } S32 getSampleCount() const { return mNumSamples; } bool hasValue() const { return mHasValue; } + // helper utility to calculate combined sumofsquares total + static F64 mergeSumsOfSquares(const SampleAccumulator& a, const SampleAccumulator& b); + private: F64 mSum, mLastValue; |