summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltracerecording.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-10-15 19:43:35 -0700
committerRichard Linden <none@none>2012-10-15 19:43:35 -0700
commit8d2f7a526545a10cd3669bf837a0b6f02cf5fe71 (patch)
tree90c7fdd0a64a2364d3e7ab636f467a776c2f1676 /indra/llcommon/lltracerecording.h
parent041dfccd1ea5b59c1b3c4e37e9a5495cad342c8f (diff)
SH-3405 WIP convert existing stats to lltrace system
converted all remaining LLViewerStats to lltrace
Diffstat (limited to 'indra/llcommon/lltracerecording.h')
-rw-r--r--indra/llcommon/lltracerecording.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/llcommon/lltracerecording.h b/indra/llcommon/lltracerecording.h
index d9ac8c327a..bd4b944e5a 100644
--- a/indra/llcommon/lltracerecording.h
+++ b/indra/llcommon/lltracerecording.h
@@ -168,6 +168,12 @@ namespace LLTrace
return (typename Measurement<T, IS_UNIT>::base_unit_t)stat.getAccumulator(mMeasurements).getLastValue();
}
+ template <typename T, typename IS_UNIT>
+ U32 getSampleCount(const Measurement<T, IS_UNIT>& stat) const
+ {
+ return stat.getAccumulator(mMeasurements).getSampleCount();
+ }
+
F64 getDuration() const { return mElapsedSeconds; }
// implementation for LLVCRControlsMixin
@@ -208,7 +214,7 @@ namespace LLTrace
return mRecordingPeriods[(mCurPeriod + mNumPeriods - 1) % mNumPeriods];
}
- Recording& getCurRecordingPeriod()
+ Recording getCurRecordingPeriod()
{
return mRecordingPeriods[mCurPeriod];
}
@@ -218,6 +224,13 @@ namespace LLTrace
return mRecordingPeriods[mCurPeriod];
}
+ Recording snapshotCurRecordingPeriod() const
+ {
+ Recording recording_copy(getCurRecordingPeriod());
+ recording_copy.stop();
+ return recording_copy;
+ }
+
Recording& getTotalRecording();
private: