diff options
author | Richard Linden <none@none> | 2012-11-14 23:52:27 -0800 |
---|---|---|
committer | Richard Linden <none@none> | 2012-11-14 23:52:27 -0800 |
commit | 9d77e030d9a0d23cebce616631677459eec1612c (patch) | |
tree | 94b196b2f89c84144ad8eed89c9bbaf6ddb2e558 /indra/llcommon/lltrace.h | |
parent | 67ec47e6da389661934ed2ddfa55ca58455fa7e5 (diff) |
SH-3406 WIP convert fast timers to lltrace system
cleaning up build
moved most includes of windows.h to llwin32headers.h to disable min/max macros, etc
streamlined Time class and consolidated functionality in BlockTimer class
llfasttimer is no longer included via llstring.h, so had to add it manually in several places
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> > |