diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/logcontrol.xml | 1 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llviewerassetstats.cpp | 25 | ||||
-rw-r--r-- | indra/newview/llviewerassetstats.h | 7 |
4 files changed, 33 insertions, 3 deletions
diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml index 92a241857e..b9ae7ebf0b 100644 --- a/indra/newview/app_settings/logcontrol.xml +++ b/indra/newview/app_settings/logcontrol.xml @@ -42,6 +42,7 @@ </array> <key>tags</key> <array> + <string>FastTimers</string> <!-- sample entry for debugging specific items <string>Avatar</string> <string>Voice</string> diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f73fc4b990..839094fc47 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -438,7 +438,7 @@ LLAppViewer::LLUpdaterInfo *LLAppViewer::sUpdaterInfo = NULL ; //---------------------------------------------------------------------------- // Metrics logging control constants //---------------------------------------------------------------------------- -static const F32 METRICS_INTERVAL_DEFAULT = 600.0; +static const F32 METRICS_INTERVAL_DEFAULT = 30.0; static const F32 METRICS_INTERVAL_QA = 30.0; static F32 app_metrics_interval = METRICS_INTERVAL_DEFAULT; static bool app_metrics_qa_mode = false; @@ -5308,6 +5308,7 @@ void LLAppViewer::metricsSend(bool enable_reporting) // Make a copy of the main stats to send into another thread. // Receiving thread takes ownership. LLViewerAssetStats * main_stats(new LLViewerAssetStats(*gViewerAssetStats)); + main_stats->stop(); main_stats->updateStats(); diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp index 73a2e24424..d79d98aaaf 100644 --- a/indra/newview/llviewerassetstats.cpp +++ b/indra/newview/llviewerassetstats.cpp @@ -239,7 +239,7 @@ LLViewerAssetStats::LLViewerAssetStats() : mRegionHandle(U64(0)), mCurRecording(NULL) { - reset(); + start(); } @@ -252,6 +252,29 @@ LLViewerAssetStats::LLViewerAssetStats(const LLViewerAssetStats & src) mRegionRecordings = src.mRegionRecordings; mCurRecording = &mRegionRecordings[mRegionHandle]; + mCurRecording->stop(); + LLStopWatchControlsMixin::initTo(src.getPlayState()); +} + +void LLViewerAssetStats::handleStart() +{ + if (mCurRecording) + { + mCurRecording->start(); + } +} + +void LLViewerAssetStats::handleStop() +{ + if (mCurRecording) + { + mCurRecording->stop(); + } +} + +void LLViewerAssetStats::handleReset() +{ + reset(); } diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h index 835df89149..5b25d791a9 100644 --- a/indra/newview/llviewerassetstats.h +++ b/indra/newview/llviewerassetstats.h @@ -74,7 +74,7 @@ * LLViewerAssetStatsFF is provided for conditional test-and-call * operations. */ -class LLViewerAssetStats +class LLViewerAssetStats : public LLStopWatchControlsMixin<LLViewerAssetStats> { public: /** @@ -177,6 +177,7 @@ public: public: LLViewerAssetStats(); LLViewerAssetStats(const LLViewerAssetStats &); + // Default destructor is correct. LLViewerAssetStats & operator=(const LLViewerAssetStats &); // Not defined @@ -202,6 +203,10 @@ public: LLSD asLLSD(bool compact_output); protected: + void handleStart(); + void handleStop(); + void handleReset(); + typedef std::map<region_handle_t, LLTrace::Recording > PerRegionRecordingContainer; // Region of the currently-active region. Always valid but may |