summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatarself.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoavatarself.cpp')
-rwxr-xr-xindra/newview/llvoavatarself.cpp57
1 files changed, 53 insertions, 4 deletions
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