summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-x[-rw-r--r--]indra/newview/CMakeLists.txt0
-rwxr-xr-x[-rw-r--r--]indra/newview/app_settings/logcontrol.xml3
-rw-r--r--[-rwxr-xr-x]indra/newview/llagent.cpp11
-rw-r--r--indra/newview/llagentlistener.cpp11
-rw-r--r--[-rwxr-xr-x]indra/newview/llagentwearables.cpp2
-rw-r--r--[-rwxr-xr-x]indra/newview/llappearancemgr.cpp70
-rw-r--r--indra/newview/llappviewer.cpp1
-rw-r--r--indra/newview/llnearbychatbar.cpp2
-rw-r--r--indra/newview/llnearbychatbar.h4
-rw-r--r--[-rwxr-xr-x]indra/newview/lltexlayer.cpp4
-rwxr-xr-x[-rw-r--r--]indra/newview/lltexturefetch.cpp20
-rw-r--r--indra/newview/lltexturefetch.h3
-rwxr-xr-x[-rw-r--r--]indra/newview/llviewerassetstats.cpp29
-rwxr-xr-x[-rw-r--r--]indra/newview/llviewerassetstats.h8
-rw-r--r--indra/newview/llviewerobjectlist.cpp5
-rw-r--r--indra/newview/llviewerobjectlist.h2
-rwxr-xr-xindra/newview/llvoavatar.cpp48
-rwxr-xr-xindra/newview/llvoavatar.h18
-rwxr-xr-xindra/newview/llvoavatarself.cpp57
-rwxr-xr-xindra/newview/llvoavatarself.h1
-rw-r--r--indra/newview/skins/default/xui/en/floater_stats.xml41
-rwxr-xr-x[-rw-r--r--]indra/newview/tests/llviewerassetstats_test.cpp9
22 files changed, 275 insertions, 74 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index f85b943c70..f85b943c70 100644..100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml
index a76eb3cd37..81e0b5602c 100644..100755
--- a/indra/newview/app_settings/logcontrol.xml
+++ b/indra/newview/app_settings/logcontrol.xml
@@ -20,7 +20,7 @@
<key>tags</key>
<array>
<string>AppInit</string>
- <string>Capabilities</string>
+ <string>Capabilities</string>
<string>SystemInfo</string>
<string>TextureCache</string>
<string>AppCache</string>
@@ -42,6 +42,7 @@
</array>
<key>tags</key>
<array>
+ <string>Avatar</string>
<!-- sample entry for debugging a specific item -->
<!-- <string>Voice</string> -->
</array>
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index af3a409944..8aba2e76a2 100755..100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -3257,6 +3257,10 @@ void LLAgent::processControlRelease(LLMessageSystem *msg, void **)
void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void **user_data)
{
gAgentQueryManager.mNumPendingQueries--;
+ if (gAgentQueryManager.mNumPendingQueries == 0)
+ {
+ selfStopPhase("fetch_texture_cache_entries");
+ }
if (!isAgentAvatarValid() || gAgentAvatarp->isDead())
{
@@ -3779,7 +3783,8 @@ void LLAgent::sendAgentSetAppearance()
return;
}
- llinfos << gAgentAvatarp->avString() << "TAT: Sent AgentSetAppearance: " << gAgentAvatarp->getBakedStatusForPrintout() << llendl;
+ gAgentAvatarp->sendAppearanceChangeMetrics();
+ LL_DEBUGS("Avatar") << gAgentAvatarp->avString() << "TAT: Sent AgentSetAppearance: " << gAgentAvatarp->getBakedStatusForPrintout() << LL_ENDL;
//dumpAvatarTEs( "sendAgentSetAppearance()" );
LLMessageSystem* msg = gMessageSystem;
@@ -3826,14 +3831,14 @@ void LLAgent::sendAgentSetAppearance()
// only update cache entries if we have all our baked textures
if (textures_current)
{
- llinfos << gAgentAvatarp->avString() << "TAT: Sending cached texture data" << llendl;
+ LL_DEBUGS("Avatar") << gAgentAvatarp->avString() << "TAT: Sending cached texture data" << LL_ENDL;
for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++)
{
BOOL generate_valid_hash = TRUE;
if (isAgentAvatarValid() && !gAgentAvatarp->isBakedTextureFinal((LLVOAvatarDefines::EBakedTextureIndex)baked_index))
{
generate_valid_hash = FALSE;
- llinfos << gAgentAvatarp->avString() << "Not caching baked texture upload for " << (U32)baked_index << " due to being uploaded at low resolution." << llendl;
+ LL_DEBUGS("Avatar") << gAgentAvatarp->avString() << "Not caching baked texture upload for " << (U32)baked_index << " due to being uploaded at low resolution." << LL_ENDL;
}
const LLUUID hash = gAgentWearables.computeBakedTextureHash((EBakedTextureIndex) baked_index, generate_valid_hash);
diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp
index a8d2222c03..a4c0b056ac 100644
--- a/indra/newview/llagentlistener.cpp
+++ b/indra/newview/llagentlistener.cpp
@@ -126,6 +126,17 @@ LLAgentListener::LLAgentListener(LLAgent &agent)
"[\"obj_uuid\"]: id of object to look at, use this or [\"position\"] to indicate the target\n"
"[\"position\"]: region position {x, y, z} where to find closest object or avatar to look at",
&LLAgentListener::lookAt);
+ add("getGroups",
+ "Send information about the agent's groups on [\"reply\"]:\n"
+ "[\"groups\"]: array of group information\n"
+ "[\"id\"]: group id\n"
+ "[\"name\"]: group name\n"
+ "[\"insignia\"]: group insignia texture id\n"
+ "[\"notices\"]: boolean indicating if this user accepts notices from this group\n"
+ "[\"display\"]: boolean indicating if this group is listed in the user's profile\n"
+ "[\"contrib\"]: user's land contribution to this group\n",
+ &LLAgentListener::getGroups,
+ LLSDMap("reply", LLSD()));
}
void LLAgentListener::requestTeleport(LLSD const & event_data) const
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index bb6b98096b..bd418ca2b3 100755..100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1633,7 +1633,7 @@ void LLAgentWearables::queryWearableCache()
gAgentAvatarp->outputRezTiming("Fetching textures from cache");
}
- llinfos << gAgentAvatarp->avString() << "Requesting texture cache entry for " << num_queries << " baked textures" << llendl;
+ LL_DEBUGS("Avatar") << gAgentAvatarp->avString() << "Requesting texture cache entry for " << num_queries << " baked textures" << LL_ENDL;
gMessageSystem->sendReliable(gAgent.getRegion()->getHost());
gAgentQueryManager.mNumPendingQueries++;
gAgentQueryManager.mWearablesCacheQueryID++;
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 13f76c0593..11f6aa1013 100755..100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -180,7 +180,7 @@ public:
protected:
~LLWearInventoryCategoryCallback()
{
- llinfos << self_av_string() << "done all inventory callbacks" << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "done all inventory callbacks" << LL_ENDL;
// Is the destructor called by ordinary dereference, or because the app's shutting down?
// If the inventory callback manager goes away, we're shutting down, no longer want the callback.
@@ -225,7 +225,7 @@ LLUpdateAppearanceOnDestroy::LLUpdateAppearanceOnDestroy(bool update_base_outfit
LLUpdateAppearanceOnDestroy::~LLUpdateAppearanceOnDestroy()
{
- llinfos << self_av_string() << "done update appearance on destroy" << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "done update appearance on destroy" << LL_ENDL;
selfStopPhase("update_appearance_on_destroy");
@@ -240,7 +240,7 @@ void LLUpdateAppearanceOnDestroy::fire(const LLUUID& inv_item)
LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem(inv_item);
const std::string item_name = item ? item->getName() : "ITEM NOT FOUND";
#ifndef LL_RELEASE_FOR_DOWNLOAD
- llinfos << self_av_string() << "callback fired [ name:" << item_name << " UUID:" << inv_item << " count:" << mFireCount << " ] " << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "callback fired [ name:" << item_name << " UUID:" << inv_item << " count:" << mFireCount << " ] " << LL_ENDL;
#endif
mFireCount++;
}
@@ -471,7 +471,7 @@ void LLWearableHoldingPattern::onAllComplete()
// Activate all gestures in this folder
if (mGestItems.count() > 0)
{
- llinfos << self_av_string() << "Activating " << mGestItems.count() << " gestures" << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "Activating " << mGestItems.count() << " gestures" << LL_ENDL;
LLGestureMgr::instance().activateGestures(mGestItems);
@@ -488,13 +488,13 @@ void LLWearableHoldingPattern::onAllComplete()
}
// Update wearables.
- llinfos << self_av_string() << "Updating agent wearables with " << mResolved << " wearable items " << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "Updating agent wearables with " << mResolved << " wearable items " << LL_ENDL;
LLAppearanceMgr::instance().updateAgentWearables(this, false);
// Update attachments to match those requested.
if (isAgentAvatarValid())
{
- llinfos << self_av_string() << "Updating " << mObjItems.count() << " attachments" << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.count() << " attachments" << LL_ENDL;
LLAgentWearables::userUpdateAttachments(mObjItems);
}
@@ -538,8 +538,8 @@ bool LLWearableHoldingPattern::pollFetchCompletion()
if (done)
{
- llinfos << self_av_string() << "polling, done status: " << completed << " timed out " << timed_out
- << " elapsed " << mWaitTime.getElapsedTimeF32() << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "polling, done status: " << completed << " timed out " << timed_out
+ << " elapsed " << mWaitTime.getElapsedTimeF32() << LL_ENDL;
mFired = true;
@@ -625,7 +625,7 @@ public:
llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
}
- llinfos << self_av_string() << "Recovered item for type " << mType << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "Recovered item for type " << mType << LL_ENDL;
LLViewerInventoryItem *itemp = gInventory.getItem(item_id);
mWearable->setItemID(item_id);
LLPointer<LLInventoryCallback> cb = new RecoveredItemLinkCB(mType,mWearable,mHolder);
@@ -692,7 +692,7 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables()
if ((data.mWearableType < LLWearableType::WT_COUNT) && (!data.mWearable))
{
// Wearable link that was never resolved; remove links to it from COF
- llinfos << self_av_string() << "removing link for unresolved item " << data.mItemID.asString() << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "removing link for unresolved item " << data.mItemID.asString() << LL_ENDL;
LLAppearanceMgr::instance().removeCOFItemLinks(data.mItemID,false);
}
}
@@ -712,11 +712,11 @@ bool LLWearableHoldingPattern::pollMissingWearables()
if (!done)
{
- llinfos << self_av_string() << "polling missing wearables, waiting for items " << mTypesToRecover.size()
+ LL_DEBUGS("Avatar") << self_av_string() << "polling missing wearables, waiting for items " << mTypesToRecover.size()
<< " links " << mTypesToLink.size()
<< " wearables, timed out " << timed_out
<< " elapsed " << mWaitTime.getElapsedTimeF32()
- << " done " << done << llendl;
+ << " done " << done << LL_ENDL;
}
if (done)
@@ -759,7 +759,7 @@ void LLWearableHoldingPattern::handleLateArrivals()
llwarns << self_av_string() << "Late arrivals not handled - in middle of missing wearables processing" << llendl;
}
- llinfos << self_av_string() << "Need to handle " << mLateArrivals.size() << " late arriving wearables" << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "Need to handle " << mLateArrivals.size() << " late arriving wearables" << LL_ENDL;
// Update mFoundList using late-arriving wearables.
std::set<LLWearableType::EType> replaced_types;
@@ -839,7 +839,7 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLWearable *wearable)
}
mResolved += 1; // just counting callbacks, not successes.
- llinfos << self_av_string() << "resolved " << mResolved << "/" << getFoundList().size() << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "resolved " << mResolved << "/" << getFoundList().size() << LL_ENDL;
if (!wearable)
{
llwarns << self_av_string() << "no wearable found" << llendl;
@@ -1438,7 +1438,7 @@ void LLAppearanceMgr::linkAll(const LLUUID& cat_uuid,
const LLViewerInventoryCategory *cat = gInventory.getCategory(cat_uuid);
const std::string cat_name = cat ? cat->getName() : "CAT NOT FOUND";
#ifndef LL_RELEASE_FOR_DOWNLOAD
- llinfos << self_av_string() << "Linking Item [ name:" << item->getName() << " UUID:" << item->getUUID() << " ] to Category [ name:" << cat_name << " UUID:" << cat_uuid << " ] " << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "Linking Item [ name:" << item->getName() << " UUID:" << item->getUUID() << " ] to Category [ name:" << cat_name << " UUID:" << cat_uuid << " ] " << LL_ENDL;
#endif
}
}
@@ -1446,7 +1446,7 @@ void LLAppearanceMgr::linkAll(const LLUUID& cat_uuid,
void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
{
LLViewerInventoryCategory *pcat = gInventory.getCategory(category);
- llinfos << self_av_string() << "starting, cat " << (pcat ? pcat->getName() : "[UNKNOWN]") << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "starting, cat " << (pcat ? pcat->getName() : "[UNKNOWN]") << LL_ENDL;
const LLUUID cof = getCOF();
@@ -1508,26 +1508,26 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
gInventory.notifyObservers();
// Create links to new COF contents.
- llinfos << self_av_string() << "creating LLUpdateAppearanceOnDestroy" << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "creating LLUpdateAppearanceOnDestroy" << LL_ENDL;
LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy(!append);
#ifndef LL_RELEASE_FOR_DOWNLOAD
- llinfos << self_av_string() << "Linking body items" << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "Linking body items" << LL_ENDL;
#endif
linkAll(cof, body_items, link_waiter);
#ifndef LL_RELEASE_FOR_DOWNLOAD
- llinfos << self_av_string() << "Linking wear items" << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "Linking wear items" << LL_ENDL;
#endif
linkAll(cof, wear_items, link_waiter);
#ifndef LL_RELEASE_FOR_DOWNLOAD
- llinfos << self_av_string() << "Linking obj items" << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "Linking obj items" << LL_ENDL;
#endif
linkAll(cof, obj_items, link_waiter);
#ifndef LL_RELEASE_FOR_DOWNLOAD
- llinfos << self_av_string() << "Linking gesture items" << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "Linking gesture items" << LL_ENDL;
#endif
linkAll(cof, gest_items, link_waiter);
@@ -1536,7 +1536,7 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
{
createBaseOutfitLink(category, link_waiter);
}
- llinfos << self_av_string() << "waiting for LLUpdateAppearanceOnDestroy" << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "waiting for LLUpdateAppearanceOnDestroy" << LL_ENDL;
}
void LLAppearanceMgr::updatePanelOutfitName(const std::string& name)
@@ -1693,7 +1693,7 @@ void LLAppearanceMgr::enforceItemRestrictions()
++it)
{
LLViewerInventoryItem *item = *it;
- llinfos << self_av_string() << "purging duplicate or excess item " << item->getName() << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "purging duplicate or excess item " << item->getName() << LL_ENDL;
gInventory.purgeObject(item->getUUID());
}
gInventory.notifyObservers();
@@ -1708,11 +1708,11 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
return;
}
- selfStartPhase("update_appearance_from_cof");
+ LLVOAvatar::ScopedPhaseSetter(gAgentAvatarp,"update_appearance_from_cof");
BoolSetter setIsInUpdateAppearanceFromCOF(mIsInUpdateAppearanceFromCOF);
- llinfos << self_av_string() << "starting" << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "starting" << LL_ENDL;
//checking integrity of the COF in terms of ordering of wearables,
//checking and updating links' descriptions of wearables in the COF (before analyzed for "dirty" state)
@@ -1888,8 +1888,8 @@ void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool
gAgentWearables.notifyLoadingStarted();
- llinfos << self_av_string() << "wearInventoryCategory( " << category->getName()
- << " )" << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "wearInventoryCategory( " << category->getName()
+ << " )" << LL_ENDL;
callAfterCategoryFetch(category->getUUID(),boost::bind(&LLAppearanceMgr::wearCategoryFinal,
&LLAppearanceMgr::instance(),
@@ -1898,7 +1898,7 @@ void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool
void LLAppearanceMgr::wearCategoryFinal(LLUUID& cat_id, bool copy_items, bool append)
{
- llinfos << self_av_string() << "starting" << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "starting" << LL_ENDL;
// We now have an outfit ready to be copied to agent inventory. Do
// it, and wear that outfit normally.
@@ -1981,8 +1981,8 @@ void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* catego
// wearables being dirty.
if(!category) return;
- llinfos << self_av_string() << "wearInventoryCategoryOnAvatar( " << category->getName()
- << " )" << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "wearInventoryCategoryOnAvatar( " << category->getName()
+ << " )" << LL_ENDL;
if (gAgentCamera.cameraCustomizeAvatar())
{
@@ -1995,7 +1995,7 @@ void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* catego
void LLAppearanceMgr::wearOutfitByName(const std::string& name)
{
- llinfos << self_av_string() << "Wearing category " << name << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "Wearing category " << name << LL_ENDL;
//inc_busy_count();
LLInventoryModel::cat_array_t cat_array;
@@ -2318,7 +2318,7 @@ const std::string OTHER_GESTURES_FOLDER = "Other Gestures";
void LLAppearanceMgr::copyLibraryGestures()
{
- llinfos << self_av_string() << "Copying library gestures" << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "Copying library gestures" << LL_ENDL;
// Copy gestures
LLUUID lib_gesture_cat_id =
@@ -2378,7 +2378,7 @@ void LLAppearanceMgr::copyLibraryGestures()
}
else
{
- llinfos << self_av_string() << "initiating fetch and copy for " << folder_name << " cat_id " << cat_id << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "initiating fetch and copy for " << folder_name << " cat_id " << cat_id << LL_ENDL;
callAfterCategoryFetch(cat_id,
boost::bind(&LLAppearanceMgr::shallowCopyCategory,
&LLAppearanceMgr::instance(),
@@ -2392,7 +2392,7 @@ void LLAppearanceMgr::autopopulateOutfits()
// If this is the very first time the user has logged into viewer2+ (from a legacy viewer, or new account)
// then auto-populate outfits from the library into the My Outfits folder.
- llinfos << self_av_string() << "avatar fully visible" << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "avatar fully visible" << LL_ENDL;
static bool check_populate_my_outfits = true;
if (check_populate_my_outfits &&
@@ -2779,7 +2779,7 @@ void LLAppearanceMgr::dumpItemArray(const LLInventoryModel::item_array_t& items,
{
asset_id = linked_item->getAssetUUID();
}
- llinfos << self_av_string() << msg << " " << i <<" " << (item ? item->getName() : "(nullitem)") << " " << asset_id.asString() << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << msg << " " << i <<" " << (item ? item->getName() : "(nullitem)") << " " << asset_id.asString() << LL_ENDL;
}
}
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 3f511748ea..bea8303d69 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4197,6 +4197,7 @@ void LLAppViewer::idle()
// The 5-second interval is nice for this purpose. If the object debug
// bit moves or is disabled, please give this a suitable home.
LLViewerAssetStatsFF::record_fps_main(gFPSClamped);
+ LLViewerAssetStatsFF::record_avatar_stats();
}
}
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 4512c14b7a..78f1fd583e 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -34,6 +34,7 @@
#include "llfirstuse.h"
#include "llnearbychatbar.h"
+#include "llnearbychatbarlistener.h"
#include "llagent.h"
#include "llgesturemgr.h"
#include "llmultigesture.h"
@@ -80,6 +81,7 @@ LLNearbyChatBar::LLNearbyChatBar(const LLSD& key)
mExpandedHeight(COLLAPSED_HEIGHT + EXPANDED_HEIGHT)
{
mSpeakerMgr = LLLocalSpeakerMgr::getInstance();
+ mListener.reset(new LLNearbyChatBarListener(*this));
}
//virtual
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h
index baf12a06ea..bb07c60154 100644
--- a/indra/newview/llnearbychatbar.h
+++ b/indra/newview/llnearbychatbar.h
@@ -35,6 +35,8 @@
#include "lloutputmonitorctrl.h"
#include "llspeakers.h"
+class LLNearbyChatBarListener;
+
class LLNearbyChatBar : public LLFloater
{
public:
@@ -92,6 +94,8 @@ protected:
LLLocalSpeakerMgr* mSpeakerMgr;
S32 mExpandedHeight;
+
+ boost::shared_ptr<LLNearbyChatBarListener> mListener;
};
#endif
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index 0802abd005..1693cfc9e2 100755..100644
--- a/indra/newview/lltexlayer.cpp
+++ b/indra/newview/lltexlayer.cpp
@@ -580,7 +580,7 @@ void LLTexLayerSetBuffer::doUpload()
args["BODYREGION"] = mTexLayerSet->getBodyRegionName();
args["RESOLUTION"] = lod_str;
LLNotificationsUtil::add("AvatarRezSelfBakedTextureUploadNotification",args);
- llinfos << self_av_string() << "Uploading [ name: " << mTexLayerSet->getBodyRegionName() << " res:" << lod_str << " time:" << (U32)mNeedsUploadTimer.getElapsedTimeF32() << " ]" << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "Uploading [ name: " << mTexLayerSet->getBodyRegionName() << " res:" << lod_str << " time:" << (U32)mNeedsUploadTimer.getElapsedTimeF32() << " ]" << LL_ENDL;
}
}
else
@@ -634,7 +634,7 @@ void LLTexLayerSetBuffer::doUpdate()
args["BODYREGION"] = mTexLayerSet->getBodyRegionName();
args["RESOLUTION"] = lod_str;
LLNotificationsUtil::add("AvatarRezSelfBakedTextureUpdateNotification",args);
- llinfos << self_av_string() << "Locally updating [ name: " << mTexLayerSet->getBodyRegionName() << " res:" << lod_str << " time:" << (U32)mNeedsUpdateTimer.getElapsedTimeF32() << " ]" << llendl;
+ LL_DEBUGS("Avatar") << self_av_string() << "Locally updating [ name: " << mTexLayerSet->getBodyRegionName() << " res:" << lod_str << " time:" << (U32)mNeedsUpdateTimer.getElapsedTimeF32() << " ]" << LL_ENDL;
}
}
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index f18aa8b4e6..e27ebf9018 100644..100755
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -52,6 +52,10 @@
#include "llviewerstats.h"
#include "llviewerassetstats.h"
#include "llworld.h"
+#include "llsdutil.h"
+
+LLStat LLTextureFetch::sCacheHitRate("texture_cache_hits", 128);
+LLStat LLTextureFetch::sCacheReadLatency("texture_cache_read_latency", 128);
//////////////////////////////////////////////////////////////////////////////
class LLTextureFetchWorker : public LLWorkerClass
@@ -242,6 +246,8 @@ private:
S32 mDecodedDiscard;
LLFrameTimer mRequestedTimer;
LLFrameTimer mFetchTimer;
+ LLTimer mCacheReadTimer;
+ F32 mCacheReadTime;
LLTextureCache::handle_t mCacheReadHandle;
LLTextureCache::handle_t mCacheWriteHandle;
U8* mBuffer;
@@ -653,6 +659,7 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,
mRequestedDiscard(-1),
mLoadedDiscard(-1),
mDecodedDiscard(-1),
+ mCacheReadTime(0.f),
mCacheReadHandle(LLTextureCache::nullHandle()),
mCacheWriteHandle(LLTextureCache::nullHandle()),
mBuffer(NULL),
@@ -926,6 +933,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage);
mCacheReadHandle = mFetcher->mTextureCache->readFromCache(filename, mID, cache_priority,
offset, size, responder);
+ mCacheReadTimer.reset();
}
else if (mUrl.empty())
{
@@ -934,6 +942,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage);
mCacheReadHandle = mFetcher->mTextureCache->readFromCache(mID, cache_priority,
offset, size, responder);
+ mCacheReadTimer.reset();
}
else if(mCanUseHTTP)
{
@@ -986,7 +995,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
LL_DEBUGS("Texture") << mID << ": Cached. Bytes: " << mFormattedImage->getDataSize()
<< " Size: " << llformat("%dx%d",mFormattedImage->getWidth(),mFormattedImage->getHeight())
<< " Desired Discard: " << mDesiredDiscard << " Desired Size: " << mDesiredSize << LL_ENDL;
- // fall through
+ LLTextureFetch::sCacheHitRate.addValue(100.f);
}
else
{
@@ -1002,6 +1011,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
mState = LOAD_FROM_NETWORK;
}
// fall through
+ LLTextureFetch::sCacheHitRate.addValue(0.f);
}
}
@@ -1780,6 +1790,7 @@ void LLTextureFetchWorker::callbackDecoded(bool success, LLImageRaw* raw, LLImag
mDecoded = TRUE;
// llinfos << mID << " : DECODE COMPLETE " << llendl;
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
+ mCacheReadTime = mCacheReadTimer.getElapsedTimeF32();
}
//////////////////////////////////////////////////////////////////////////////
@@ -2092,6 +2103,11 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level,
discard_level = worker->mDecodedDiscard;
raw = worker->mRawImage;
aux = worker->mAuxImage;
+ F32 cache_read_time = worker->mCacheReadTime;
+ if (cache_read_time != 0.f)
+ {
+ sCacheReadLatency.addValue(cache_read_time * 1000.f);
+ }
res = true;
LL_DEBUGS("Texture") << id << ": Request Finished. State: " << worker->mState << " Discard: " << discard_level << LL_ENDL;
worker->unlockWorkMutex();
@@ -2959,7 +2975,7 @@ TFReqSendMetrics::doWork(LLTextureFetch * fetcher)
// In QA mode, Metrics submode, log the result for ease of testing
if (fetcher->isQAMode())
{
- LL_INFOS("Textures") << merged_llsd << LL_ENDL;
+ LL_INFOS("Textures") << ll_pretty_print_sd(merged_llsd) << LL_ENDL;
}
gViewerAssetStatsThread1->reset();
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h
index 35df7d816f..710dd67e99 100644
--- a/indra/newview/lltexturefetch.h
+++ b/indra/newview/lltexturefetch.h
@@ -164,6 +164,9 @@ private:
LLMutex mQueueMutex; //to protect mRequestMap and mCommands only
LLMutex mNetworkQueueMutex; //to protect mNetworkQueue, mHTTPTextureQueue and mCancelQueue.
+ static LLStat sCacheHitRate;
+ static LLStat sCacheReadLatency;
+
LLTextureCache* mTextureCache;
LLImageDecodeThread* mImageDecodeThread;
LLCurlRequest* mCurlGetRequest;
diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp
index e621cf647e..4928f93a51 100644..100755
--- a/indra/newview/llviewerassetstats.cpp
+++ b/indra/newview/llviewerassetstats.cpp
@@ -30,6 +30,7 @@
#include "llregionhandle.h"
#include "stdtypes.h"
+#include "llvoavatar.h"
/*
* Classes and utility functions for per-thread and per-region
@@ -126,6 +127,8 @@ LLViewerAssetStats::PerRegionStats::merge(const LLViewerAssetStats::PerRegionSta
mFPS.merge(src.mFPS);
}
+ // Avatar stats - data all comes from main thread, so leave alone.
+
// Requests
for (int i = 0; i < LL_ARRAY_SIZE(mRequests); ++i)
{
@@ -133,6 +136,7 @@ LLViewerAssetStats::PerRegionStats::merge(const LLViewerAssetStats::PerRegionSta
mRequests[i].mDequeued.merge(src.mRequests[i].mDequeued);
mRequests[i].mResponse.merge(src.mRequests[i].mResponse);
}
+
}
@@ -252,6 +256,14 @@ LLViewerAssetStats::recordFPS(F32 fps)
mCurRegionStats->mFPS.record(fps);
}
+void
+LLViewerAssetStats::recordAvatarStats()
+{
+ std::vector<S32> rez_counts;
+ LLVOAvatar::getNearbyRezzedStats(rez_counts);
+ mCurRegionStats->mAvatarRezStates = rez_counts;
+}
+
LLSD
LLViewerAssetStats::asLLSD(bool compact_output)
{
@@ -282,6 +294,10 @@ LLViewerAssetStats::asLLSD(bool compact_output)
static const LLSD::String max_tag("max");
static const LLSD::String mean_tag("mean");
+ // Avatar sub-tags
+ static const LLSD::String avatar_tag("avatar");
+ static const LLSD::String avatar_nearby_tag("nearby");
+
const duration_t now = LLViewerAssetStatsFF::get_timestamp();
mCurRegionStats->accumulateTime(now);
@@ -329,6 +345,11 @@ LLViewerAssetStats::asLLSD(bool compact_output)
slot[max_tag] = LLSD(F64(stats.mFPS.getMax()));
slot[mean_tag] = LLSD(F64(stats.mFPS.getMean()));
}
+ reg_stat[avatar_tag][avatar_nearby_tag] = LLSD::emptyArray();
+ for (S32 j = 0; j < stats.mAvatarRezStates.size(); ++j)
+ {
+ reg_stat[avatar_tag][avatar_nearby_tag].append(stats.mAvatarRezStates[j]);
+ }
U32 grid_x(0), grid_y(0);
grid_from_region_handle(it->first, &grid_x, &grid_y);
@@ -439,6 +460,14 @@ record_fps_main(F32 fps)
gViewerAssetStatsMain->recordFPS(fps);
}
+void
+record_avatar_stats()
+{
+ if (! gViewerAssetStatsMain)
+ return;
+
+ gViewerAssetStatsMain->recordAvatarStats();
+}
// 'thread1' - should be for TextureFetch thread
diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h
index 73ec5974b2..6cb0cc4060 100644..100755
--- a/indra/newview/llviewerassetstats.h
+++ b/indra/newview/llviewerassetstats.h
@@ -125,7 +125,8 @@ public:
mRegionHandle(src.mRegionHandle),
mTotalTime(src.mTotalTime),
mStartTimestamp(src.mStartTimestamp),
- mFPS(src.mFPS)
+ mFPS(src.mFPS),
+ mAvatarRezStates(src.mAvatarRezStates)
{
for (int i = 0; i < LL_ARRAY_SIZE(mRequests); ++i)
{
@@ -148,6 +149,7 @@ public:
duration_t mTotalTime;
duration_t mStartTimestamp;
LLSimpleStatMMM<> mFPS;
+ std::vector<S32> mAvatarRezStates;
struct prs_group
{
@@ -181,6 +183,9 @@ public:
// Frames-Per-Second Samples
void recordFPS(F32 fps);
+ // Avatar-related statistics
+ void recordAvatarStats();
+
// Merge a source instance into a destination instance. This is
// conceptually an 'operator+=()' method:
// - counts are added
@@ -310,6 +315,7 @@ void record_response_main(LLViewerAssetType::EType at, bool with_http, bool is_t
void record_fps_main(F32 fps);
+void record_avatar_stats();
/**
* Region context, event and duration loggers for Thread 1.
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 6912faa9ec..54ccfb9aae 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -91,8 +91,9 @@ extern LLPipeline gPipeline;
// Statics for object lookup tables.
U32 LLViewerObjectList::sSimulatorMachineIndex = 1; // Not zero deliberately, to speed up index check.
-std::map<U64, U32> LLViewerObjectList::sIPAndPortToIndex;
+std::map<U64, U32> LLViewerObjectList::sIPAndPortToIndex;
std::map<U64, LLUUID> LLViewerObjectList::sIndexAndLocalIDToUUID;
+LLStat LLViewerObjectList::sCacheHitRate("object_cache_hits", 128);
LLViewerObjectList::LLViewerObjectList()
{
@@ -542,6 +543,8 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
}
justCreated = TRUE;
mNumNewObjects++;
+ sCacheHitRate.addValue(cached ? 100.f : 0.f);
+
}
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index c5f2a2c1ee..64925f46ae 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -192,6 +192,8 @@ protected:
std::vector<OrphanInfo> mOrphanChildren; // UUID's of orphaned objects
S32 mNumOrphans;
+ static LLStat sCacheHitRate;
+
typedef std::vector<LLPointer<LLViewerObject> > vobj_list_t;
vobj_list_t mObjects;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 2dbf3ac698..ea771b6d68 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -101,6 +101,8 @@
#include "llvoicevisualizer.h" // Ventrella
#include "lldebugmessagebox.h"
+#include "llsdutil.h"
+
extern F32 SPEED_ADJUST_MAX;
extern F32 SPEED_ADJUST_MAX_SEC;
extern F32 ANIM_SPEED_MAX;
@@ -789,7 +791,7 @@ std::string LLVOAvatar::avString() const
void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string comment)
{
- llinfos << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32()
+ LL_DEBUGS("Avatar") << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32()
<< "sec ]"
<< avString()
<< "RuthTimer " << (U32)mRuthDebugTimer.getElapsedTimeF32()
@@ -800,7 +802,7 @@ void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string c
if (gAgentAvatarp && !gAgentAvatarp->isDead()) // not safe to call during ~LLVOAvatarself
{
LLSD metrics = gAgentAvatarp->metricsData();
- llinfos << gAgentAvatarp->avString() << " metrics " << metrics << llendl;
+ LL_DEBUGS("Avatar") << gAgentAvatarp->avString() << " metrics " << ll_pretty_print_sd(metrics) << LL_ENDL;
}
if (gSavedSettings.getBOOL("DebugAvatarRezTime"))
@@ -2908,13 +2910,13 @@ void LLVOAvatar::idleUpdateLoadingEffect()
{
if (isFullyLoaded() && mFirstFullyVisible && isSelf())
{
- llinfos << avString() << "self isFullyLoaded, mFirstFullyVisible" << llendl;
+ LL_DEBUGS("Avatar") << avString() << "self isFullyLoaded, mFirstFullyVisible" << LL_ENDL;
mFirstFullyVisible = FALSE;
LLAppearanceMgr::instance().onFirstFullyVisible();
}
if (isFullyLoaded() && mFirstFullyVisible && !isSelf())
{
- llinfos << avString() << "other isFullyLoaded, mFirstFullyVisible" << llendl;
+ LL_DEBUGS("Avatar") << avString() << "other isFullyLoaded, mFirstFullyVisible" << LL_ENDL;
mFirstFullyVisible = FALSE;
}
if (isFullyLoaded())
@@ -4085,7 +4087,7 @@ void LLVOAvatar::updateVisibility()
LLNameValue* firstname = getNVPair("FirstName");
if (firstname)
{
- llinfos << avString() << " updating visibility" << llendl;
+ LL_DEBUGS("Avatar") << avString() << " updating visibility" << LL_ENDL;
}
else
{
@@ -4297,7 +4299,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
LLNameValue* firstname = getNVPair("FirstName");
if (firstname)
{
- llinfos << avString() << " in render" << llendl;
+ LL_DEBUGS("Avatar") << avString() << " in render" << LL_ENDL;
}
else
{
@@ -6561,13 +6563,13 @@ void LLVOAvatar::updateRuthTimer(bool loading)
const F32 LOADING_TIMEOUT__SECONDS = 120.f;
if (mRuthTimer.getElapsedTimeF32() > LOADING_TIMEOUT__SECONDS)
{
- llinfos << avString()
+ LL_DEBUGS("Avatar") << avString()
<< "Ruth Timer timeout: Missing texture data for '" << getFullname() << "' "
<< "( Params loaded : " << !visualParamWeightsAreDefault() << " ) "
<< "( Lower : " << isTextureDefined(TEX_LOWER_BAKED) << " ) "
<< "( Upper : " << isTextureDefined(TEX_UPPER_BAKED) << " ) "
<< "( Head : " << isTextureDefined(TEX_HEAD_BAKED) << " )."
- << llendl;
+ << LL_ENDL;
LLAvatarPropertiesProcessor::getInstance()->sendAvatarTexturesRequest(getID());
mRuthTimer.reset();
@@ -7030,7 +7032,7 @@ LLColor4 LLVOAvatar::getDummyColor()
void LLVOAvatar::dumpAvatarTEs( const std::string& context ) const
{
- llinfos << avString() << (isSelf() ? "Self: " : "Other: ") << context << llendl;
+ LL_DEBUGS("Avatar") << avString() << (isSelf() ? "Self: " : "Other: ") << context << LL_ENDL;
for (LLVOAvatarDictionary::Textures::const_iterator iter = LLVOAvatarDictionary::getInstance()->getTextures().begin();
iter != LLVOAvatarDictionary::getInstance()->getTextures().end();
++iter)
@@ -7040,23 +7042,23 @@ void LLVOAvatar::dumpAvatarTEs( const std::string& context ) const
const LLViewerTexture* te_image = getImage(iter->first,0);
if( !te_image )
{
- llinfos << avString() << " " << texture_dict->mName << ": null ptr" << llendl;
+ LL_DEBUGS("Avatar") << avString() << " " << texture_dict->mName << ": null ptr" << LL_ENDL;
}
else if( te_image->getID().isNull() )
{
- llinfos << avString() << " " << texture_dict->mName << ": null UUID" << llendl;
+ LL_DEBUGS("Avatar") << avString() << " " << texture_dict->mName << ": null UUID" << LL_ENDL;
}
else if( te_image->getID() == IMG_DEFAULT )
{
- llinfos << avString() << " " << texture_dict->mName << ": IMG_DEFAULT" << llendl;
+ LL_DEBUGS("Avatar") << avString() << " " << texture_dict->mName << ": IMG_DEFAULT" << LL_ENDL;
}
else if( te_image->getID() == IMG_DEFAULT_AVATAR )
{
- llinfos << avString() << " " << texture_dict->mName << ": IMG_DEFAULT_AVATAR" << llendl;
+ LL_DEBUGS("Avatar") << avString() << " " << texture_dict->mName << ": IMG_DEFAULT_AVATAR" << LL_ENDL;
}
else
{
- llinfos << avString() << " " << texture_dict->mName << ": " << te_image->getID() << llendl;
+ LL_DEBUGS("Avatar") << avString() << " " << texture_dict->mName << ": " << te_image->getID() << LL_ENDL;
}
}
}
@@ -7187,7 +7189,7 @@ void LLVOAvatar::rebuildHUD()
//-----------------------------------------------------------------------------
void LLVOAvatar::onFirstTEMessageReceived()
{
- llinfos << avString() << llendl;
+ LL_DEBUGS("Avatar") << avString() << LL_ENDL;
if( !mFirstTEMessageReceived )
{
mFirstTEMessageReceived = TRUE;
@@ -7216,7 +7218,7 @@ void LLVOAvatar::onFirstTEMessageReceived()
image->setLoadedCallback( onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, TRUE, TRUE, new LLTextureMaskData( mID ),
src_callback_list, paused);
}
- llinfos << avString() << "layer_baked, setting onInitialBakedTextureLoaded as callback" << llendl;
+ LL_DEBUGS("Avatar") << avString() << "layer_baked, setting onInitialBakedTextureLoaded as callback" << LL_ENDL;
image->setLoadedCallback( onInitialBakedTextureLoaded, MAX_DISCARD_LEVEL, FALSE, FALSE, new LLUUID( mID ),
src_callback_list, paused );
}
@@ -7278,8 +7280,8 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
BOOL is_first_appearance_message = !mFirstAppearanceMessageReceived;
mFirstAppearanceMessageReceived = TRUE;
- llinfos << avString() << "processAvatarAppearance start " << mID
- << " first? " << is_first_appearance_message << " self? " << isSelf() << llendl;
+ LL_DEBUGS("Avatar") << avString() << "processAvatarAppearance start " << mID
+ << " first? " << is_first_appearance_message << " self? " << isSelf() << LL_ENDL;
if( isSelf() )
@@ -7336,7 +7338,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
bool drop_visual_params_debug = gSavedSettings.getBOOL("BlockSomeAvatarAppearanceVisualParams") && (ll_rand(2) == 0); // pretend that ~12% of AvatarAppearance messages arrived without a VisualParam block, for testing
if( num_blocks > 1 && !drop_visual_params_debug)
{
- llinfos << avString() << " handle visual params, num_blocks " << num_blocks << llendl;
+ LL_DEBUGS("Avatar") << avString() << " handle visual params, num_blocks " << num_blocks << LL_ENDL;
BOOL params_changed = FALSE;
BOOL interp_params = FALSE;
@@ -7409,7 +7411,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
else
{
// AvatarAppearance message arrived without visual params
- llinfos << avString() << "no visual params" << llendl;
+ LL_DEBUGS("Avatar") << avString() << "no visual params" << LL_ENDL;
if (drop_visual_params_debug)
{
llinfos << "Debug-faked lack of parameters on AvatarAppearance for object: " << getID() << llendl;
@@ -7569,7 +7571,7 @@ void LLVOAvatar::onInitialBakedTextureLoaded( BOOL success, LLViewerFetchedTextu
if (selfp)
{
- llinfos << selfp->avString() << "discard_level " << discard_level << " success " << success << " final " << final << llendl;
+ LL_DEBUGS("Avatar") << selfp->avString() << "discard_level " << discard_level << " success " << success << " final " << final << LL_ENDL;
}
if (!success && selfp)
@@ -7594,7 +7596,7 @@ void LLVOAvatar::onBakedTextureLoaded(BOOL success,
LLVOAvatar *selfp = (LLVOAvatar *)gObjectList.findObject(*avatar_idp);
if (selfp)
{
- llinfos << selfp->avString() << "discard_level " << discard_level << " success " << success << " final " << final << " id " << src_vi->getID() << llendl;
+ LL_DEBUGS("Avatar") << selfp->avString() << "discard_level " << discard_level << " success " << success << " final " << final << " id " << src_vi->getID() << LL_ENDL;
}
if (selfp && !success)
@@ -7629,7 +7631,7 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id )
LLViewerTexture* image_baked = getImage( mBakedTextureDatas[i].mTextureIndex, 0 );
if (id == image_baked->getID())
{
- llinfos << avString() << " i " << i << " id " << id << llendl;
+ LL_DEBUGS("Avatar") << avString() << " i " << i << " id " << id << LL_ENDL;
mBakedTextureDatas[i].mIsLoaded = true;
mBakedTextureDatas[i].mLastTextureIndex = id;
mBakedTextureDatas[i].mIsUsed = true;
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index df9d8143b1..76261c0dc8 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -290,6 +290,24 @@ public:
void stopAllPhases();
void clearPhases();
LLSD dumpPhases();
+
+ class ScopedPhaseSetter
+ {
+ public:
+ ScopedPhaseSetter(LLVOAvatar* avatar, std::string phase_name):
+ mAvatar(avatar),mPhaseName(phase_name)
+ {
+ if (mAvatar) { mAvatar->startPhase(mPhaseName); }
+ }
+ ~ScopedPhaseSetter()
+ {
+ if (mAvatar) { mAvatar->stopPhase(mPhaseName); }
+ }
+ private:
+ std::string mPhaseName;
+ LLVOAvatar* mAvatar;
+ };
+
protected:
BOOL updateIsFullyLoaded();
BOOL processFullyLoadedChange(bool loading);
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 27d499b9c4..20f91811a3 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -58,6 +58,7 @@
#include "llappearancemgr.h"
#include "llmeshrepository.h"
#include "llvovolume.h"
+#include "llsdutil.h"
#if LL_MSVC
// disable boost::lexical_cast warning
@@ -2089,6 +2090,7 @@ const std::string LLVOAvatarSelf::debugDumpAllLocalTextureDataInfo() const
// Dump avatar metrics data.
LLSD LLVOAvatarSelf::metricsData()
{
+ // runway - add region info
LLSD result;
result["id"] = getID();
result["rez_status"] = getRezzedStatus();
@@ -2109,6 +2111,53 @@ LLSD LLVOAvatarSelf::metricsData()
return result;
}
+class ViewerAppearanceChangeMetricsResponder: public LLCurl::Responder
+{
+public:
+ ViewerAppearanceChangeMetricsResponder()
+ {
+ }
+
+ virtual void completed(U32 status,
+ const std::string& reason,
+ const LLSD& content)
+ {
+ if (isGoodStatus(status))
+ {
+ llinfos << "OK" << llendl;
+ result(content);
+ }
+ else
+ {
+ llwarns << "Failed " << status << " reason " << reason << llendl;
+ error(status,reason);
+ }
+ }
+};
+
+void LLVOAvatarSelf::sendAppearanceChangeMetrics()
+{
+ // gAgentAvatarp->stopAllPhases();
+
+ LLSD msg = metricsData();
+ msg["message"] = "ViewerAppearanceChangeMetrics";
+
+ LL_DEBUGS("Avatar") << avString() << "message: " << ll_pretty_print_sd(msg) << LL_ENDL;
+ std::string caps_url;
+ if (getRegion())
+ {
+ // runway - change here to activate.
+ caps_url = getRegion()->getCapability("ViewerMetrics");
+ }
+ if (!caps_url.empty())
+ {
+ LLCurlRequest::headers_t headers;
+ LLHTTPClient::post(caps_url,
+ msg,
+ new ViewerAppearanceChangeMetricsResponder);
+ }
+}
+
const LLUUID& LLVOAvatarSelf::grabBakedTexture(EBakedTextureIndex baked_index) const
{
if (canGrabBakedTexture(baked_index))
@@ -2307,7 +2356,7 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid )
if (isAllLocalTextureDataFinal())
{
LLNotificationsUtil::add("AvatarRezSelfBakedDoneNotification",args);
- llinfos << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32()
+ LL_DEBUGS("Avatar") << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32()
<< "sec ]"
<< avString()
<< "RuthTimer " << (U32)mRuthDebugTimer.getElapsedTimeF32()
@@ -2319,7 +2368,7 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid )
{
args["STATUS"] = debugDumpAllLocalTextureDataInfo();
LLNotificationsUtil::add("AvatarRezSelfBakedUpdateNotification",args);
- llinfos << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32()
+ LL_DEBUGS("Avatar") << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32()
<< "sec ]"
<< avString()
<< "RuthTimer " << (U32)mRuthDebugTimer.getElapsedTimeF32()
@@ -2393,10 +2442,10 @@ void LLVOAvatarSelf::outputRezDiagnostics() const
void LLVOAvatarSelf::outputRezTiming(const std::string& msg) const
{
- llinfos
+ LL_DEBUGS("Avatar")
<< avString()
<< llformat("%s. Time from avatar creation: %.2f", msg.c_str(), mDebugSelfLoadTimer.getElapsedTimeF32())
- << llendl;
+ << LL_ENDL;
}
void LLVOAvatarSelf::reportAvatarRezTime() const
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index c9098f174c..fc1b602764 100755
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -370,6 +370,7 @@ public:
const std::string debugDumpLocalTextureDataInfo(const LLTexLayerSet* layerset) const; // Lists out state of this particular baked texture layer
const std::string debugDumpAllLocalTextureDataInfo() const; // Lists out which baked textures are at highest LOD
LLSD metricsData();
+ void sendAppearanceChangeMetrics(); // send data associated with completing a change.
private:
LLFrameTimer mDebugSelfLoadTimer;
F32 mDebugTimeWearablesLoaded;
diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml
index 2fd932786b..9400f7b94f 100644
--- a/indra/newview/skins/default/xui/en/floater_stats.xml
+++ b/indra/newview/skins/default/xui/en/floater_stats.xml
@@ -149,13 +149,52 @@
show_per_sec="true"
show_bar="false">
</stat_bar>
+ <stat_bar
+ name="object_cache_hits"
+ label="Object Cache Hit Rate"
+ stat="object_cache_hits"
+ bar_min="0"
+ bar_max="100"
+ unit_label="%"
+ tick_spacing="20"
+ label_spacing="20"
+ show_history="true"
+ show_per_sec="false"
+ show_bar="false">
+ </stat_bar>
</stat_view>
<!--Texture Stats-->
<stat_view
name="texture"
label="Texture"
show_label="true">
- <stat_bar
+ <stat_bar
+ name="texture_cache_hits"
+ label="Cache Hit Rate"
+ stat="texture_cache_hits"
+ bar_min="0.f"
+ bar_max="100.f"
+ unit_label="%"
+ tick_spacing="20"
+ label_spacing="20"
+ show_history="true"
+ show_per_sec="false"
+ show_bar="false">
+ </stat_bar>
+ <stat_bar
+ name="texture_cache_read_latency"
+ label="Cache Read Latency"
+ unit_label="msec"
+ stat="texture_cache_read_latency"
+ bar_min="0.f"
+ bar_max="1000.f"
+ tick_spacing="100"
+ label_spacing="200"
+ show_history="true"
+ show_per_sec="false"
+ show_bar="false">
+ </stat_bar>
+ <stat_bar
name="numimagesstat"
label="Count"
stat="numimagesstat"
diff --git a/indra/newview/tests/llviewerassetstats_test.cpp b/indra/newview/tests/llviewerassetstats_test.cpp
index 3faddc13c1..5e18f91b23 100644..100755
--- a/indra/newview/tests/llviewerassetstats_test.cpp
+++ b/indra/newview/tests/llviewerassetstats_test.cpp
@@ -35,6 +35,15 @@
#include "lluuid.h"
#include "llsdutil.h"
#include "llregionhandle.h"
+#include "../llvoavatar.h"
+
+void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts)
+{
+ counts.resize(3);
+ counts[0] = 0;
+ counts[1] = 0;
+ counts[2] = 1;
+}
static const char * all_keys[] =
{