summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltracerecording.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-06-17 01:18:21 -0700
committerRichard Linden <none@none>2013-06-17 01:18:21 -0700
commit3f2de87340b1c831ea59e4a3ca960d49f343c9fd (patch)
tree1663517a0e50fbd9f736b29603bbd957d38967eb /indra/llcommon/lltracerecording.cpp
parent9fd3af3c389ed491b515cbb5136b344b069913e4 (diff)
SH-3931 WIP Interesting: Add graphs to visualize scene load metrics
added getAs and setAs to LLUnit to make it clearer how you specify units removed accidental 0-based indexing of periodicRecording history... should now be consistently 1-based, with 0 accessing current active recording removed per frame timer updates of all historical timer bars in fast timer display added missing assignment operator to recordings
Diffstat (limited to 'indra/llcommon/lltracerecording.cpp')
-rw-r--r--indra/llcommon/lltracerecording.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp
index ff90da3822..f2c5941011 100644
--- a/indra/llcommon/lltracerecording.cpp
+++ b/indra/llcommon/lltracerecording.cpp
@@ -122,21 +122,26 @@ Recording::Recording()
Recording::Recording( const Recording& other )
{
+ *this = other;
+}
+
+Recording& Recording::operator = (const Recording& other)
+{
// this will allow us to seamlessly start without affecting any data we've acquired from other
setPlayState(PAUSED);
Recording& mutable_other = const_cast<Recording&>(other);
+ mutable_other.update();
EPlayState other_play_state = other.getPlayState();
- mutable_other.pause();
- mBuffers = other.mBuffers;
+ mBuffers = mutable_other.mBuffers;
LLStopWatchControlsMixin<Recording>::setPlayState(other_play_state);
- mutable_other.setPlayState(other_play_state);
// above call will clear mElapsedSeconds as a side effect, so copy it here
mElapsedSeconds = other.mElapsedSeconds;
mSamplingTimer = other.mSamplingTimer;
+ return *this;
}
@@ -444,12 +449,8 @@ void PeriodicRecording::nextPeriod()
void PeriodicRecording::appendRecording(Recording& recording)
{
- // if I have a recording of any length, then close it off and start a fresh one
- if (getCurRecording().getDuration().value())
- {
- nextPeriod();
- }
getCurRecording().appendRecording(recording);
+ nextPeriod();
}
@@ -460,12 +461,6 @@ void PeriodicRecording::appendPeriodicRecording( PeriodicRecording& other )
getCurRecording().update();
other.getCurRecording().update();
- // if I have a recording of any length, then close it off and start a fresh one
- if (getCurRecording().getDuration().value())
- {
- nextPeriod();
- }
-
if (mAutoResize)
{
S32 other_index = (other.mCurPeriod + 1) % other.mRecordingPeriods.size();