summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerstats.h
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-07-27 14:13:07 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-07-27 14:13:07 -0700
commit0e06dc8964d5ae31fccb2da522d05d822530d3c7 (patch)
treed15dfd4ab9dfc4724efe62373cbca6a24c97006b /indra/newview/llviewerstats.h
parent4c9760a073853ae81a78aa99119c059cdfaba664 (diff)
parentfe8a5a007ab82f3d6a763c5cb133e1299d238632 (diff)
Merge from dessie/viewer-release
Diffstat (limited to 'indra/newview/llviewerstats.h')
-rw-r--r--indra/newview/llviewerstats.h55
1 files changed, 0 insertions, 55 deletions
diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h
index 694eeaf097..13d73000d2 100644
--- a/indra/newview/llviewerstats.h
+++ b/indra/newview/llviewerstats.h
@@ -197,61 +197,6 @@ public:
void addToMessage(LLSD &body) const;
- struct StatsAccumulator
- {
- S32 mCount;
- F32 mSum;
- F32 mSumOfSquares;
- U32 mCountOfNextUpdatesToIgnore;
-
- inline void push( F32 val )
- {
- if ( mCountOfNextUpdatesToIgnore > 0 )
- {
- mCountOfNextUpdatesToIgnore--;
- return;
- }
-
- mCount++;
- mSum += val;
- mSumOfSquares += val * val;
- }
-
- inline F32 getMean() const
- {
- return (mCount == 0) ? 0.f : ((F32)mSum)/mCount;
- }
-
- inline F32 getStdDev() const
- {
- const F32 mean = getMean();
- return (mCount == 0) ? 0.f : sqrt( mSumOfSquares/mCount - (mean * mean) );
- }
-
- inline U32 getCount() const
- {
- return mCount;
- }
-
- inline void reset()
- {
- mCount = 0;
- mSum = mSumOfSquares = 0.f;
- mCountOfNextUpdatesToIgnore = 0;
- }
-
- inline LLSD getData() const
- {
- LLSD data;
- data["mean"] = getMean();
- data["std_dev"] = getStdDev();
- data["count"] = (S32)mCount;
- return data;
- }
- };
-
- StatsAccumulator mAgentPositionSnaps;
-
private:
F64 mStats[ST_COUNT];