diff options
author | Richard Linden <none@none> | 2012-10-19 19:35:01 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2012-10-19 19:35:01 -0700 |
commit | 176ffa54b44f2ef73f23e3252dd439f52fab3265 (patch) | |
tree | a261deb62bf993388805146119c15fadef917732 /indra/newview/llsimplestat.h | |
parent | bd52d784f904cb0b46be5826f6c7df31b214fc09 (diff) |
SH-3405 WIP convert existing stats to lltrace system
finished most of conversion of llviewerassetstats
ported some param block fixes from viewer-chui
converted viewer asset stats to param block format
Diffstat (limited to 'indra/newview/llsimplestat.h')
-rw-r--r-- | indra/newview/llsimplestat.h | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/indra/newview/llsimplestat.h b/indra/newview/llsimplestat.h index 9d7780c4f9..80ce99b774 100644 --- a/indra/newview/llsimplestat.h +++ b/indra/newview/llsimplestat.h @@ -99,43 +99,43 @@ public: * values back to zero. */ void reset() - { - mCount = 0; - mMin = Value(0); - mMax = Value(0); - mTotal = Value(0); - } + { + mCount = 0; + mMin = Value(0); + mMax = Value(0); + mTotal = Value(0); + } void record(Value v) + { + if (mCount) + { + mMin = llmin(mMin, v); + mMax = llmax(mMax, v); + } + else { - if (mCount) - { - mMin = llmin(mMin, v); - mMax = llmax(mMax, v); - } - else - { - mMin = v; - mMax = v; - } - mTotal += v; - ++mCount; + mMin = v; + mMax = v; } + mTotal += v; + ++mCount; + } void merge(const LLSimpleStatMMM<VALUE_T> & src) + { + if (! mCount) + { + *this = src; + } + else if (src.mCount) { - if (! mCount) - { - *this = src; - } - else if (src.mCount) - { - mMin = llmin(mMin, src.mMin); - mMax = llmax(mMax, src.mMax); - mCount += src.mCount; - mTotal += src.mTotal; - } + mMin = llmin(mMin, src.mMin); + mMax = llmax(mMax, src.mMax); + mCount += src.mCount; + mTotal += src.mTotal; } + } inline U32 getCount() const { return mCount; } inline Value getMin() const { return mMin; } |