summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltracerecording.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-12-02 23:00:36 -0800
committerRichard Linden <none@none>2012-12-02 23:00:36 -0800
commit13e4edf1cd664864afa585bc83bbe99d4f743326 (patch)
tree52d6b16185099b58bcf7d284d753d938ecced027 /indra/llcommon/lltracerecording.cpp
parent4f9a5d0554c16a81625574a7a4ad6d5070e649e3 (diff)
SH-3406 WIP convert fast timers to lltrace system
started moving fast timer historical stats over to LLTrace periodic recording
Diffstat (limited to 'indra/llcommon/lltracerecording.cpp')
-rw-r--r--indra/llcommon/lltracerecording.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp
index e31e36cb27..ff3ae1e553 100644
--- a/indra/llcommon/lltracerecording.cpp
+++ b/indra/llcommon/lltracerecording.cpp
@@ -26,6 +26,7 @@
#include "linden_common.h"
#include "lltrace.h"
+#include "llfasttimer.h"
#include "lltracerecording.h"
#include "lltracethreadrecorder.h"
#include "llthread.h"
@@ -142,6 +143,16 @@ void Recording::appendRecording( const Recording& other )
mElapsedSeconds += other.mElapsedSeconds;
}
+LLUnit<LLUnits::Seconds, F64> Recording::getSum(const TraceType<TimerAccumulator>& stat) const
+{
+ return (F64)(*mStackTimers)[stat.getIndex()].mSelfTimeCounter / (F64)LLTrace::BlockTimer::countsPerSecond();
+}
+
+LLUnit<LLUnits::Seconds, F64> Recording::getPerSec(const TraceType<TimerAccumulator>& stat) const
+{
+ return (F64)(*mStackTimers)[stat.getIndex()].mSelfTimeCounter / ((F64)LLTrace::BlockTimer::countsPerSecond() * mElapsedSeconds);
+}
+
F64 Recording::getSum( const TraceType<CountAccumulator<F64> >& stat ) const
{
return (*mCountsFloat)[stat.getIndex()].getSum();