summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltracerecording.h
diff options
context:
space:
mode:
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: