summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltracerecording.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/lltracerecording.cpp')
-rw-r--r--indra/llcommon/lltracerecording.cpp35
1 files changed, 13 insertions, 22 deletions
diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp
index e4cff551f9..7cd6280f03 100644
--- a/indra/llcommon/lltracerecording.cpp
+++ b/indra/llcommon/lltracerecording.cpp
@@ -38,7 +38,6 @@ namespace LLTrace
Recording::Recording()
: mElapsedSeconds(0),
- mIsStarted(false),
mRates(new AccumulatorBuffer<RateAccumulator<F32> >()),
mMeasurements(new AccumulatorBuffer<MeasurementAccumulator<F32> >()),
mStackTimers(new AccumulatorBuffer<TimerAccumulator>())
@@ -47,13 +46,7 @@ Recording::Recording()
Recording::~Recording()
{}
-void Recording::start()
-{
- reset();
- resume();
-}
-
-void Recording::reset()
+void Recording::handleReset()
{
mRates.write()->reset();
mMeasurements.write()->reset();
@@ -63,24 +56,22 @@ void Recording::reset()
mSamplingTimer.reset();
}
-void Recording::resume()
+void Recording::handleStart()
+{
+ mSamplingTimer.reset();
+ LLTrace::get_thread_recorder()->activate(this);
+}
+
+void Recording::handleStop()
{
- if (!mIsStarted)
- {
- mSamplingTimer.reset();
- LLTrace::get_thread_recorder()->activate(this);
- mIsStarted = true;
- }
+ mElapsedSeconds += mSamplingTimer.getElapsedTimeF64();
+ LLTrace::get_thread_recorder()->deactivate(this);
}
-void Recording::stop()
+void Recording::handleSplitTo(Recording& other)
{
- if (mIsStarted)
- {
- mElapsedSeconds += mSamplingTimer.getElapsedTimeF64();
- LLTrace::get_thread_recorder()->deactivate(this);
- mIsStarted = false;
- }
+ stop();
+ other.restart();
}