summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2012-03-05 14:19:39 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2012-03-05 14:19:39 -0500
commitcc762ba60493a2dceba53929d10640a556a5e9ae (patch)
tree0f118d4df5ac7da98e75fd5edf6bdd2031f8ec50 /indra/newview/llvoavatar.cpp
parenta37e121dbf3eba78f3f44f7028eb9849c7a3883e (diff)
SH-2970 WIP - simple LLSD metrics for self av
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-xindra/newview/llvoavatar.cpp37
1 files changed, 24 insertions, 13 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 9249e0fa21..dbb9c218d3 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -797,6 +797,9 @@ void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string c
<< " : " << comment
<< llendl;
+ LLSD metrics = gAgentAvatarp->metricsData();
+ llinfos << gAgentAvatarp->avString() << " metrics " << metrics << llendl;
+
if (gSavedSettings.getBOOL("DebugAvatarRezTime"))
{
LLSD args;
@@ -807,17 +810,6 @@ void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string c
}
}
-// Dump avatar metrics data.
-// virtual
-LLSD LLVOAvatar::metricsData()
-{
- LLSD result;
- result["id"] = getID();
- result["rez_status"] = getRezzedStatus();
- result["is_self"] = isSelf();
- return result;
-}
-
//------------------------------------------------------------------------
// LLVOAvatar::~LLVOAvatar()
//------------------------------------------------------------------------
@@ -957,9 +949,9 @@ BOOL LLVOAvatar::hasGray() const
S32 LLVOAvatar::getRezzedStatus() const
{
if (getIsCloud()) return 0;
- if (hasGray()) return 1;
if (isFullyTextured()) return 2;
- return -1;
+ llassert(hasGray());
+ return 1; // gray
}
void LLVOAvatar::deleteLayerSetCaches(bool clearAll)
@@ -1009,6 +1001,22 @@ BOOL LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars)
}
// static
+void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts)
+{
+ counts.clear();
+ counts.resize(3);
+ for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
+ iter != LLCharacter::sInstances.end(); ++iter)
+ {
+ LLVOAvatar* inst = (LLVOAvatar*) *iter;
+ if (!inst)
+ continue;
+ S32 rez_status = inst->getRezzedStatus();
+ counts[rez_status]++;
+ }
+}
+
+// static
void LLVOAvatar::dumpBakedStatus()
{
LLVector3d camera_pos_global = gAgentCamera.getCameraPositionGlobal();
@@ -7733,6 +7741,9 @@ void LLVOAvatar::cullAvatarsByPixelArea()
}
}
+ // runway - this doesn't detect gray/grey state.
+ // think we just need to be checking self av since it's the only
+ // one with lltexlayer stuff.
S32 grey_avatars = 0;
if (LLVOAvatar::areAllNearbyInstancesBaked(grey_avatars))
{