diff options
author | Richard Linden <none@none> | 2012-10-04 23:11:57 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2012-10-04 23:11:57 -0700 |
commit | 3960fdf9e01619ddfd7903bcdd8d894f432752d0 (patch) | |
tree | 55dd31db4b2b382e3fda6eee1e85bb9fddc65e83 /indra/llcommon/lltracerecording.cpp | |
parent | 8f5e83789254d19a1a31737b0d7515cd7e967b26 (diff) |
SH-3275 WIP Update viewer metrics system to be more flexible
moved threadrecorder classes into separate file
added Count trace type, which tracks value increases and decreases and can report churn
as well as overall growth rate
Diffstat (limited to 'indra/llcommon/lltracerecording.cpp')
-rw-r--r-- | indra/llcommon/lltracerecording.cpp | 54 |
1 files changed, 44 insertions, 10 deletions
diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp index 95cdb44e4b..e4cff551f9 100644 --- a/indra/llcommon/lltracerecording.cpp +++ b/indra/llcommon/lltracerecording.cpp @@ -110,46 +110,80 @@ void Recording::mergeDeltas(const Recording& baseline, const Recording& target) } -F32 Recording::getSum( Rate<F32>& stat ) +F32 Recording::getSum(const Rate<F32>& stat) { return stat.getAccumulator(mRates).getSum(); } -F32 Recording::getSum( Measurement<F32>& stat ) +F32 Recording::getPerSec(const Rate<F32>& stat) { - return stat.getAccumulator(mMeasurements).getSum(); + return stat.getAccumulator(mRates).getSum() / mElapsedSeconds; } - -F32 Recording::getPerSec( Rate<F32>& stat ) +F32 Recording::getSum(const Measurement<F32>& stat) { - return stat.getAccumulator(mRates).getSum() / mElapsedSeconds; + return stat.getAccumulator(mMeasurements).getSum(); } -F32 Recording::getMin( Measurement<F32>& stat ) +F32 Recording::getMin(const Measurement<F32>& stat) { return stat.getAccumulator(mMeasurements).getMin(); } -F32 Recording::getMax( Measurement<F32>& stat ) +F32 Recording::getMax(const Measurement<F32>& stat) { return stat.getAccumulator(mMeasurements).getMax(); } -F32 Recording::getMean( Measurement<F32>& stat ) +F32 Recording::getMean(const Measurement<F32>& stat) { return stat.getAccumulator(mMeasurements).getMean(); } -F32 Recording::getStandardDeviation( Measurement<F32>& stat ) +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); +} } |