From a99db82e9b3ce25bf2745721b57f0259a770b26a Mon Sep 17 00:00:00 2001 From: Monty Brandenberg Date: Fri, 19 Nov 2010 15:14:40 -0800 Subject: ESC-155 Multi-threaded umbrella collector for stats aggregation Code complete with the intelligence to merge counts, mins, maxes and means with reasonable defences. Added QAMode controls to the viewer so that we can QA this more quickly by reducing the timing interval and sending the metrics body to local logging as well as to the caps service. --- indra/newview/llappviewer.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 2e056238e4..e696e1af84 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -336,10 +336,9 @@ LLAppViewer::LLUpdaterInfo *LLAppViewer::sUpdaterInfo = NULL ; //---------------------------------------------------------------------------- // Metrics logging control constants //---------------------------------------------------------------------------- -static const F32 METRICS_INTERVAL_MIN = 300.0; -static const F32 METRICS_INTERVAL_MAX = 3600.0; static const F32 METRICS_INTERVAL_DEFAULT = 600.0; - +static const F32 METRICS_INTERVAL_QA = 30.0; +static F32 app_metrics_interval = METRICS_INTERVAL_DEFAULT; void idle_afk_check() { @@ -664,8 +663,15 @@ bool LLAppViewer::init() // Called before threads are created. LLCurl::initClass(); LLMachineID::init(); - - LLViewerAssetStatsFF::init(); + + { + // Viewer metrics initialization + if (gSavedSettings.getBOOL("QAMode") && gSavedSettings.getBOOL("QAModeMetricsSubmode")) + { + app_metrics_interval = METRICS_INTERVAL_QA; + } + LLViewerAssetStatsFF::init(); + } initThreads(); writeSystemInfo(); @@ -3701,7 +3707,7 @@ void LLAppViewer::idle() static LLTimer report_interval; // *TODO: Add configuration controls for this - if (report_interval.getElapsedTimeF32() >= METRICS_INTERVAL_DEFAULT) + if (report_interval.getElapsedTimeF32() >= app_metrics_interval) { metricsIdle(! gDisconnected); report_interval.reset(); @@ -4595,7 +4601,6 @@ void LLAppViewer::metricsIdle(bool enable_reporting) if (regionp) { caps_url = regionp->getCapability("ViewerMetrics"); - caps_url = "http://localhost:80/putz/"; } if (enable_reporting && regionp && ! caps_url.empty()) @@ -4608,9 +4613,9 @@ void LLAppViewer::metricsIdle(bool enable_reporting) LLSD * envelope = new LLSD(LLSD::emptyMap()); { + (*envelope) = gViewerAssetStatsMain->asLLSD(); (*envelope)["session_id"] = gAgentSessionID; (*envelope)["agent_id"] = gAgentID; - (*envelope)["regions"] = gViewerAssetStatsMain->asLLSD(); } if (LLAppViewer::sTextureFetch) -- cgit v1.2.3