From 08704b36f6850d2d2fd29bb984238f760215356a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 19 Apr 2012 17:12:49 -0400 Subject: startup phase tracking added to appearance metrics --- indra/newview/llstartup.cpp | 5 +++-- indra/newview/llstartup.h | 4 ++++ indra/newview/llvoavatarself.cpp | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) mode change 100644 => 100755 indra/newview/llstartup.h diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 31343ee908..8586900b9c 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -240,6 +240,7 @@ static bool mLoginStatePastUI = false; boost::scoped_ptr LLStartUp::sStateWatcher(new LLEventStream("StartupState")); boost::scoped_ptr LLStartUp::sListener(new LLStartupListener()); +boost::scoped_ptr LLStartUp::sPhases(new LLViewerStats::PhaseMap); // // local function declaration @@ -2707,9 +2708,9 @@ void LLStartUp::setStartupState( EStartupState state ) getStartupStateString() << " to " << startupStateToString(state) << LL_ENDL; - selfStopPhase(getStartupStateString()); + sPhases->stopPhase(getStartupStateString()); gStartupState = state; - selfStartPhase(getStartupStateString()); + sPhases->startPhase(getStartupStateString()); postStartupState(); } diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h old mode 100644 new mode 100755 index 0a18ef1b2d..3754aaf966 --- a/indra/newview/llstartup.h +++ b/indra/newview/llstartup.h @@ -34,6 +34,8 @@ class LLEventPump; class LLStartupListener; class LLSLURL; +#include "llviewerstats.h" + // functions bool idle_startup(); void release_start_screen(); @@ -113,6 +115,7 @@ public: static bool startLLProxy(); // Initialize the SOCKS 5 proxy + static LLViewerStats::PhaseMap& getPhases() { return *sPhases; } private: static LLSLURL sStartSLURL; @@ -120,6 +123,7 @@ private: static EStartupState gStartupState; // Do not set directly, use LLStartup::setStartupState static boost::scoped_ptr sStateWatcher; static boost::scoped_ptr sListener; + static boost::scoped_ptr sPhases; }; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index aac07df2a9..14d5b1c8d9 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -59,6 +59,7 @@ #include "llmeshrepository.h" #include "llvovolume.h" #include "llsdutil.h" +#include "llstartup.h" #if LL_MSVC // disable boost::lexical_cast warning @@ -2148,6 +2149,7 @@ LLSD LLVOAvatarSelf::metricsData() result["timers"]["invisible"] = mInvisibleTimer.getElapsedTimeF32(); result["timers"]["fully_loaded"] = mFullyLoadedTimer.getElapsedTimeF32(); result["phases"] = getPhases().dumpPhases(); + result["startup"] = LLStartUp::getPhases().dumpPhases(); return result; } -- cgit v1.2.3