summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltracerecording.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-10-10 19:25:56 -0700
committerRichard Linden <none@none>2012-10-10 19:25:56 -0700
commit74ac0182ec8f7a0f6d0ea89f5814f0998ab90b62 (patch)
treeaa8e0b6b231c3eb24719b884a8e951b217ca60e7 /indra/llcommon/lltracerecording.cpp
parent960f8764ad2407add941bc8650b295f1e77beb19 (diff)
SH-3405 WIP convert existing stats to lltrace system
fixed units conversion so that trace getters return convertable units removed circular dependencies from lltrace* converted more stats to lltrace
Diffstat (limited to 'indra/llcommon/lltracerecording.cpp')
-rw-r--r--indra/llcommon/lltracerecording.cpp96
1 files changed, 10 insertions, 86 deletions
diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp
index f0b17ef100..e20bf797e7 100644
--- a/indra/llcommon/lltracerecording.cpp
+++ b/indra/llcommon/lltracerecording.cpp
@@ -25,8 +25,9 @@
#include "linden_common.h"
-#include "lltracerecording.h"
#include "lltrace.h"
+#include "lltracerecording.h"
+#include "lltracethreadrecorder.h"
#include "llthread.h"
namespace LLTrace
@@ -101,99 +102,22 @@ void Recording::makePrimary()
mStackTimers.write()->makePrimary();
}
-bool Recording::isPrimary()
+bool Recording::isPrimary() const
{
return mRates->isPrimary();
}
-void Recording::mergeSamples( const Recording& other )
+void Recording::addSamples( const Recording& other )
{
- mRates.write()->mergeSamples(*other.mRates);
- mMeasurements.write()->mergeSamples(*other.mMeasurements);
- mStackTimers.write()->mergeSamples(*other.mStackTimers);
+ mRates.write()->addSamples(*other.mRates);
+ mMeasurements.write()->addSamples(*other.mMeasurements);
+ mStackTimers.write()->addSamples(*other.mStackTimers);
}
-void Recording::mergeDeltas(const Recording& baseline, const Recording& target)
+void Recording::addDeltas(const Recording& baseline, const Recording& target)
{
- mRates.write()->mergeDeltas(*baseline.mRates, *target.mRates);
- mStackTimers.write()->mergeDeltas(*baseline.mStackTimers, *target.mStackTimers);
+ mRates.write()->addDeltas(*baseline.mRates, *target.mRates);
+ mStackTimers.write()->addDeltas(*baseline.mStackTimers, *target.mStackTimers);
}
-
-F32 Recording::getSum(const Rate<F32>& stat)
-{
- return stat.getAccumulator(mRates).getSum();
-}
-
-F32 Recording::getPerSec(const Rate<F32>& stat)
-{
- return stat.getAccumulator(mRates).getSum() / mElapsedSeconds;
-}
-
-F32 Recording::getSum(const Measurement<F32>& stat)
-{
- return stat.getAccumulator(mMeasurements).getSum();
-}
-
-F32 Recording::getMin(const Measurement<F32>& stat)
-{
- return stat.getAccumulator(mMeasurements).getMin();
-}
-
-F32 Recording::getMax(const Measurement<F32>& stat)
-{
- return stat.getAccumulator(mMeasurements).getMax();
-}
-
-F32 Recording::getMean(const Measurement<F32>& stat)
-{
- return stat.getAccumulator(mMeasurements).getMean();
-}
-
-F32 Recording::getStandardDeviation(const Measurement<F32>& stat)
-{
- return stat.getAccumulator(mMeasurements).getStandardDeviation();
-}
-
-F32 Recording::getSum(const Count<F32>& stat)
-{
- return getSum(stat.mTotal);
-}
-
-F32 Recording::getPerSec(const Count<F32>& stat)
-{
- return getPerSec(stat.mTotal);
-}
-
-F32 Recording::getIncrease(const Count<F32>& stat)
-{
- return getSum(stat.mIncrease);
-}
-
-F32 Recording::getIncreasePerSec(const Count<F32>& stat)
-{
- return getPerSec(stat.mIncrease);
-}
-
-F32 Recording::getDecrease(const Count<F32>& stat)
-{
- return getSum(stat.mDecrease);
-}
-
-F32 Recording::getDecreasePerSec(const Count<F32>& stat)
-{
- return getPerSec(stat.mDecrease);
-}
-
-F32 Recording::getChurn(const Count<F32>& stat)
-{
- return getIncrease(stat) + getDecrease(stat);
-}
-
-F32 Recording::getChurnPerSec(const Count<F32>& stat)
-{
- return getIncreasePerSec(stat) + getDecreasePerSec(stat);
-}
-
-
}