From a37e121dbf3eba78f3f44f7028eb9849c7a3883e Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Sat, 3 Mar 2012 06:59:34 -0500 Subject: SH-2970 WIP - avatar metrics --- indra/newview/llvoavatar.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'indra/newview/llvoavatar.cpp') 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++) -- cgit v1.2.3