summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2012-03-03 06:59:34 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2012-03-03 06:59:34 -0500
commita37e121dbf3eba78f3f44f7028eb9849c7a3883e (patch)
treeed45c69a6d60c7528d9c78c07e11833f971196ea /indra/newview/llvoavatar.cpp
parent7b3f721e7a110f9f63caacb2546207fddb44fc4b (diff)
SH-2970 WIP - avatar metrics
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-xindra/newview/llvoavatar.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 8ea0fb7c50..9249e0fa21 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -807,6 +807,17 @@ 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()
//------------------------------------------------------------------------
@@ -943,6 +954,14 @@ BOOL LLVOAvatar::hasGray() const
return !getIsCloud() && !isFullyTextured();
}
+S32 LLVOAvatar::getRezzedStatus() const
+{
+ if (getIsCloud()) return 0;
+ if (hasGray()) return 1;
+ if (isFullyTextured()) return 2;
+ return -1;
+}
+
void LLVOAvatar::deleteLayerSetCaches(bool clearAll)
{
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)