summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2010-11-19 15:14:40 -0800
committerMonty Brandenberg <monty@lindenlab.com>2010-11-19 15:14:40 -0800
commita99db82e9b3ce25bf2745721b57f0259a770b26a (patch)
tree97e90a90d1f9ed43e43d5ba2c94a9ca96158297a /indra/newview/llappviewer.cpp
parentd666a3d92cb5dd9844c29e5472db542de7b5ac9e (diff)
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.
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp21
1 files changed, 13 insertions, 8 deletions
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)