From 35168862f5ecc06166fbd1a9bcd601ae2abbf75b Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 16 Apr 2010 12:28:54 -0400 Subject: EXT-6892 : Add debug setting to show avatar rez times This pops up a notification whenever another avatar rezzes. Controlled by a #define, currently set to ON. --- indra/newview/llvoavatar.cpp | 16 +++++++++++++++- indra/newview/llvoavatar.h | 1 + indra/newview/skins/default/xui/en/notifications.xml | 6 ++++++ 3 files changed, 22 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index ba0da9a4c6..8c5928224f 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -66,6 +66,7 @@ #include "llkeyframewalkmotion.h" #include "llmutelist.h" #include "llmoveview.h" +#include "llnotificationsutil.h" #include "llquantize.h" #include "llregionhandle.h" #include "llresmgr.h" @@ -101,6 +102,8 @@ #include +#define DISPLAY_AVATAR_LOAD_TIMES + using namespace LLVOAvatarDefines; //----------------------------------------------------------------------------- @@ -5851,6 +5854,7 @@ void LLVOAvatar::updateRuthTimer(bool loading) if (mPreviousFullyLoaded) { mRuthTimer.reset(); + mRuthDebugTimer.reset(); } const F32 LOADING_TIMEOUT = 120.f; @@ -5879,7 +5883,17 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading) mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > PAUSE); - +#ifdef DISPLAY_AVATAR_LOAD_TIMES + if (!mPreviousFullyLoaded && !loading && mFullyLoaded) + { + llinfos << "Avatar '" << getFullname() << "' resolved in " << mRuthDebugTimer.getElapsedTimeF32() << " seconds." << llendl; + LLSD args; + args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32()); + args["NAME"] = getFullname(); + LLNotificationsUtil::add("AvatarRezNotification",args); + } +#endif + // did our loading state "change" from last call? const S32 UPDATE_RATE = 30; BOOL changed = diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 55753233b0..8da4c226ed 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -259,6 +259,7 @@ private: S32 mFullyLoadedFrameCounter; LLFrameTimer mFullyLoadedTimer; LLFrameTimer mRuthTimer; + LLFrameTimer mRuthDebugTimer; // For tracking how long it takes for av to rez /** State ** ** diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 6c9564c8cf..ca922bf724 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -5968,6 +5968,12 @@ The button will be shown when there is enough space for it. Drag items from inventory onto a person in the resident picker + +Avatar '[NAME]' rezzed in [TIME] seconds. + - Your CPU speed does not meet the minimum requirements. -- cgit v1.2.3