diff options
Diffstat (limited to 'indra/llcommon/lltrace.h')
-rw-r--r-- | indra/llcommon/lltrace.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h index fb9dca5e84..61fed6e7b8 100644 --- a/indra/llcommon/lltrace.h +++ b/indra/llcommon/lltrace.h @@ -235,8 +235,8 @@ namespace LLTrace MeasurementAccumulator() : mSum(0), - mMin(std::numeric_limits<T>::max()), - mMax(std::numeric_limits<T>::min()), + mMin((std::numeric_limits<T>::max)()), + mMax((std::numeric_limits<T>::min)()), mMean(0), mVarianceSum(0), mNumSamples(0), @@ -380,6 +380,24 @@ namespace LLTrace U32 mNumSamples; }; + class TimerAccumulator + { + public: + void addSamples(const TimerAccumulator& other); + void reset(const TimerAccumulator* other); + + // + // members + // + U64 mSelfTimeCounter, + mTotalTimeCounter; + U32 mCalls; + class BlockTimer* mLastCaller; // used to bootstrap tree construction + U16 mActiveCount; // number of timers with this ID active on stack + bool mMoveUpTree; // needs to be moved up the tree of timers at the end of frame + }; + + template <typename T = F64> class Measurement : public TraceType<MeasurementAccumulator<typename LLUnits::HighestPrecisionType<T>::type_t> > |