summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-05-19 13:54:37 -0400
committerLoren Shih <seraph@lindenlab.com>2010-05-19 13:54:37 -0400
commit0924e3397cf86a3e7e986da9aeb29e98baace35c (patch)
tree55fb1dc7edc29f196ce1d3d66954b885dfcb3625 /indra/newview
parentb550bb0f09197c35b80d18d540761a7831c3e89b (diff)
AVP-72 FIXED Debug settings for gathering Welcome Island Rez time statistics
Added outfit baking notification. Cleaned up some code around notifications. Added some more clarity to notification message wording.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvoavatar.h13
-rw-r--r--indra/newview/llvoavatarself.cpp87
-rw-r--r--indra/newview/llvoavatarself.h31
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml25
4 files changed, 99 insertions, 57 deletions
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index d74b4fe7b2..86a7cdae02 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -260,8 +260,6 @@ private:
S32 mFullyLoadedFrameCounter;
LLFrameTimer mFullyLoadedTimer;
LLFrameTimer mRuthTimer;
- LLFrameTimer mRuthDebugTimer; // For tracking how long it takes for av to rez
- LLFrameTimer mDebugExistenceTimer; // Debugging for how long the avatar has been in memory.
/** State
** **
@@ -894,6 +892,9 @@ private:
** DIAGNOSTICS
**/
+ //--------------------------------------------------------------------
+ // General
+ //--------------------------------------------------------------------
public:
static void dumpArchetypeXML(void*);
static void dumpBakedStatus();
@@ -913,6 +914,14 @@ private:
F32 mAdjustedPixelArea;
std::string mDebugText;
+
+ //--------------------------------------------------------------------
+ // Avatar Rez Metrics
+ //--------------------------------------------------------------------
+protected:
+ LLFrameTimer mRuthDebugTimer; // For tracking how long it takes for av to rez
+ LLFrameTimer mDebugExistenceTimer; // Debugging for how long the avatar has been in memory.
+
/** Diagnostics
** **
*******************************************************************************/
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 8bf082ad45..f329ec83b0 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -49,12 +49,14 @@
#include "llhudeffecttrail.h"
#include "llhudmanager.h"
#include "llinventoryfunctions.h"
+#include "llnotificationsutil.h"
#include "llselectmgr.h"
#include "lltoolgrab.h" // for needsRenderBeam
#include "lltoolmgr.h" // for needsRenderBeam
#include "lltoolmorph.h"
#include "lltrans.h"
#include "llviewercamera.h"
+#include "llviewercontrol.h"
#include "llviewermenu.h"
#include "llviewerobjectlist.h"
#include "llviewerstats.h"
@@ -149,7 +151,7 @@ void LLVOAvatarSelf::initInstance()
LLVOAvatar::initInstance();
llinfos << "Self avatar object created. Starting timer." << llendl;
- mSelfLoadTimer.reset();
+ mDebugSelfLoadTimer.reset();
// clear all times to -1 for debugging
for (U32 i =0; i < LLVOAvatarDefines::TEX_NUM_INDICES; ++i)
{
@@ -1396,6 +1398,7 @@ void LLVOAvatarSelf::invalidateAll()
{
invalidateComposite(mBakedTextureDatas[i].mTexLayerSet, TRUE);
}
+ mDebugSelfLoadTimer.reset();
}
//-----------------------------------------------------------------------------
@@ -1780,7 +1783,7 @@ if (index < 0 || index >= TEX_NUM_INDICES)
if (discard_level >=0 && discard_level <= MAX_DISCARD_LEVEL) // ignore discard level -1, as it means we have no data.
{
- mTextureLoadTimes[(U32)index][(U32)discard_level] = mSelfLoadTimer.getElapsedTimeF32();
+ mTextureLoadTimes[(U32)index][(U32)discard_level] = mDebugSelfLoadTimer.getElapsedTimeF32();
}
if (final)
{
@@ -1795,7 +1798,7 @@ void LLVOAvatarSelf::bakedTextureUpload(EBakedTextureIndex index, BOOL finished)
{
done = 1;
}
- mBakedTextureTimes[index][done] = mSelfLoadTimer.getElapsedTimeF32();
+ mBakedTextureTimes[index][done] = mDebugSelfLoadTimer.getElapsedTimeF32();
}
const LLUUID& LLVOAvatarSelf::grabLocalTexture(ETextureIndex type, U32 index) const
@@ -1969,42 +1972,56 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid )
if (!hasPendingBakedUploads())
{
gAgent.sendAgentSetAppearance();
- F32 final_time = mSelfLoadTimer.getElapsedTimeF32();
- llinfos << "REZTIME: Myself rez stats:" << llendl;
- llinfos << "\t Time from avatar creation to load wearables: " << (S32)mTimeWearablesLoaded << llendl;
- llinfos << "\t Time from avatar creation to de-cloud: " << (S32)mTimeAvatarVisible << llendl;
- llinfos << "\t Time from avatar creation to de-cloud for others: " << (S32)final_time << llendl;
- llinfos << "\t Load time for each texture: " << llendl;
- for (U32 i = 0; i < LLVOAvatarDefines::TEX_NUM_INDICES; ++i)
- {
- std::stringstream out;
- out << "\t\t (" << i << ") ";
- U32 j=0;
- for (j=0; j <= MAX_DISCARD_LEVEL; j++)
- {
- out << "\t";
- S32 load_time = (S32)mTextureLoadTimes[i][j];
- if (load_time == -1)
- {
- out << "*";
- if (j == 0)
- break;
- }
- else
- {
- out << load_time;
- }
- }
- // Don't print out non-existent textures.
- if (j != 0)
- llinfos << out.str() << llendl;
+ if (gSavedSettings.getBOOL("DebugAvatarRezTime"))
+ {
+ LLSD args;
+ args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32());
+ args["TIME"] = (U32)mDebugSelfLoadTimer.getElapsedTimeF32();
+ LLNotificationsUtil::add("AvatarRezSelfNotification",args);
}
- llinfos << "\t Time points for each upload (start / finish)" << llendl;
- for (U32 i = 0; i < LLVOAvatarDefines::BAKED_NUM_INDICES; ++i)
+
+ outputRezDiagnostics();
+ }
+}
+
+void LLVOAvatarSelf::outputRezDiagnostics() const
+{
+ const F32 final_time = mDebugSelfLoadTimer.getElapsedTimeF32();
+ llinfos << "REZTIME: Myself rez stats:" << llendl;
+ llinfos << "\t Time from avatar creation to load wearables: " << (S32)mTimeWearablesLoaded << llendl;
+ llinfos << "\t Time from avatar creation to de-cloud: " << (S32)mTimeAvatarVisible << llendl;
+ llinfos << "\t Time from avatar creation to de-cloud for others: " << (S32)final_time << llendl;
+ llinfos << "\t Load time for each texture: " << llendl;
+ for (U32 i = 0; i < LLVOAvatarDefines::TEX_NUM_INDICES; ++i)
+ {
+ std::stringstream out;
+ out << "\t\t (" << i << ") ";
+ U32 j=0;
+ for (j=0; j <= MAX_DISCARD_LEVEL; j++)
{
- llinfos << "\t\t (" << i << ") \t" << (S32)mBakedTextureTimes[i][0] << " / " << (S32)mBakedTextureTimes[i][1] << llendl;
+ out << "\t";
+ S32 load_time = (S32)mTextureLoadTimes[i][j];
+ if (load_time == -1)
+ {
+ out << "*";
+ if (j == 0)
+ break;
+ }
+ else
+ {
+ out << load_time;
+ }
}
+
+ // Don't print out non-existent textures.
+ if (j != 0)
+ llinfos << out.str() << llendl;
+ }
+ llinfos << "\t Time points for each upload (start / finish)" << llendl;
+ for (U32 i = 0; i < LLVOAvatarDefines::BAKED_NUM_INDICES; ++i)
+ {
+ llinfos << "\t\t (" << i << ") \t" << (S32)mBakedTextureTimes[i][0] << " / " << (S32)mBakedTextureTimes[i][1] << llendl;
}
}
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 03856b3a3b..9dc38c953e 100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -126,25 +126,14 @@ public:
/*virtual*/ BOOL getIsCloud();
void bakedTextureUpload(LLVOAvatarDefines::EBakedTextureIndex index, BOOL finished);
static void onTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
- void wearablesLoaded() { mTimeWearablesLoaded = mSelfLoadTimer.getElapsedTimeF32(); }
- void avatarVisible() { mTimeAvatarVisible = mSelfLoadTimer.getElapsedTimeF32(); }
-
-private:
//--------------------------------------------------------------------
// Region state
//--------------------------------------------------------------------
+private:
U64 mLastRegionHandle;
LLFrameTimer mRegionCrossingTimer;
S32 mRegionCrossingCount;
- LLFrameTimer mSelfLoadTimer;
- F32 mTimeWearablesLoaded;
- F32 mTimeAvatarVisible;
- F32 mTextureLoadTimes[LLVOAvatarDefines::TEX_NUM_INDICES][MAX_DISCARD_LEVEL+1]; // stores load time for each texture,
- // at each discard level
- F32 mBakedTextureTimes[LLVOAvatarDefines::BAKED_NUM_INDICES][2]; // stores time to start upload and finish upload of each baked texture
-
- void timingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
/** State
** **
@@ -336,11 +325,29 @@ public:
** DIAGNOSTICS
**/
+ //--------------------------------------------------------------------
+ // General
+ //--------------------------------------------------------------------
public:
static void dumpTotalLocalTextureByteCount();
void dumpLocalTextures() const;
static void dumpScratchTextureByteCount();
+ //--------------------------------------------------------------------
+ // Avatar Rez Metrics
+ //--------------------------------------------------------------------
+public:
+ void wearablesLoaded() { mTimeWearablesLoaded = mDebugSelfLoadTimer.getElapsedTimeF32(); }
+ void avatarVisible() { mTimeAvatarVisible = mDebugSelfLoadTimer.getElapsedTimeF32(); }
+ void outputRezDiagnostics() const;
+private:
+ LLFrameTimer mDebugSelfLoadTimer;
+ F32 mTimeWearablesLoaded;
+ F32 mTimeAvatarVisible;
+ F32 mTextureLoadTimes[LLVOAvatarDefines::TEX_NUM_INDICES][MAX_DISCARD_LEVEL+1]; // load time for each texture at each discard level
+ F32 mBakedTextureTimes[LLVOAvatarDefines::BAKED_NUM_INDICES][2]; // time to start upload and finish upload of each baked texture
+ void timingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
+
/** Diagnostics
** **
*******************************************************************************/
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 300437b3c9..999f804e71 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -6129,15 +6129,24 @@ Deed to group failed.
icon="notifytip.tga"
name="AvatarRezNotification"
type="notifytip">
-( [EXISTENCE] seconds )
-Avatar '[NAME]' rezzed in [TIME] seconds.
+( [EXISTENCE] seconds alive )
+Avatar '[NAME]' declouded in [TIME] seconds.
</notification>
<notification
icon="notifytip.tga"
+ name="AvatarRezSelfNotification"
+ type="notifytip">
+( [EXISTENCE] seconds alive )
+You finished baking your outfit in [TIME] seconds.
+ </notification>
+
+
+ <notification
+ icon="notifytip.tga"
name="AvatarRezCloudNotification"
type="notifytip">
-( [EXISTENCE] seconds )
+( [EXISTENCE] seconds alive )
Avatar '[NAME]' became cloud.
</notification>
@@ -6145,7 +6154,7 @@ Avatar '[NAME]' became cloud.
icon="notifytip.tga"
name="AvatarRezArrivedNotification"
type="notifytip">
-( [EXISTENCE] seconds )
+( [EXISTENCE] seconds alive )
Avatar '[NAME]' appeared.
</notification>
@@ -6153,7 +6162,7 @@ Avatar '[NAME]' appeared.
icon="notifytip.tga"
name="AvatarRezLeftCloudNotification"
type="notifytip">
-( [EXISTENCE] seconds )
+( [EXISTENCE] seconds alive )
Avatar '[NAME]' left after [TIME] seconds as cloud.
</notification>
@@ -6161,7 +6170,7 @@ Avatar '[NAME]' left after [TIME] seconds as cloud.
icon="notifytip.tga"
name="AvatarRezEnteredAppearanceNotification"
type="notifytip">
-( [EXISTENCE] seconds )
+( [EXISTENCE] seconds alive )
Avatar '[NAME]' entered appearance mode.
</notification>
@@ -6169,7 +6178,7 @@ Avatar '[NAME]' entered appearance mode.
icon="notifytip.tga"
name="AvatarRezLeftAppearanceNotification"
type="notifytip">
-( [EXISTENCE] seconds )
+( [EXISTENCE] seconds alive )
Avatar '[NAME]' left appearance mode.
</notification>
@@ -6177,7 +6186,7 @@ Avatar '[NAME]' left appearance mode.
icon="notifytip.tga"
name="AvatarRezLeftNotification"
type="notifytip">
-( [EXISTENCE] seconds )
+( [EXISTENCE] seconds alive )
Avatar '[NAME]' left as fully loaded.
</notification>