summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatarself.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoavatarself.cpp')
-rwxr-xr-x[-rw-r--r--]indra/newview/llvoavatarself.cpp56
1 files changed, 44 insertions, 12 deletions
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 6d672acc32..7a81063f83 100644..100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -668,15 +668,13 @@ BOOL LLVOAvatarSelf::updateCharacter(LLAgent &agent)
}
// virtual
-BOOL LLVOAvatarSelf::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
+void LLVOAvatarSelf::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
{
- if (!isAgentAvatarValid())
+ if (isAgentAvatarValid())
{
- return TRUE;
+ LLVOAvatar::idleUpdate(agent, world, time);
+ idleUpdateTractorBeam();
}
- LLVOAvatar::idleUpdate(agent, world, time);
- idleUpdateTractorBeam();
- return TRUE;
}
// virtual
@@ -2132,9 +2130,7 @@ LLSD LLVOAvatarSelf::metricsData()
{
// runway - add region info
LLSD result;
- result["id"] = getID();
result["rez_status"] = LLVOAvatar::rezStatusToString(getRezzedStatus());
- result["is_self"] = isSelf();
std::vector<S32> rez_counts;
LLVOAvatar::getNearbyRezzedStats(rez_counts);
result["nearby"] = LLSD::emptyMap();
@@ -2148,7 +2144,6 @@ LLSD LLVOAvatarSelf::metricsData()
result["timers"]["ruth"] = mRuthTimer.getElapsedTimeF32();
result["timers"]["invisible"] = mInvisibleTimer.getElapsedTimeF32();
result["timers"]["fully_loaded"] = mFullyLoadedTimer.getElapsedTimeF32();
- result["phases"] = getPhases().dumpPhases();
result["startup"] = LLStartUp::getPhases().dumpPhases();
return result;
@@ -2157,7 +2152,12 @@ LLSD LLVOAvatarSelf::metricsData()
class ViewerAppearanceChangeMetricsResponder: public LLCurl::Responder
{
public:
- ViewerAppearanceChangeMetricsResponder()
+ ViewerAppearanceChangeMetricsResponder( S32 expected_sequence,
+ volatile const S32 & live_sequence,
+ volatile bool & reporting_started):
+ mExpectedSequence(expected_sequence),
+ mLiveSequence(live_sequence),
+ mReportingStarted(reporting_started)
{
}
@@ -2176,14 +2176,44 @@ public:
error(status,reason);
}
}
+
+ // virtual
+ void error(U32 status_num, const std::string & reason)
+ {
+ }
+
+ // virtual
+ void result(const LLSD & content)
+ {
+ if (mLiveSequence == mExpectedSequence)
+ {
+ mReportingStarted = true;
+ }
+ }
+
+private:
+ S32 mExpectedSequence;
+ volatile const S32 & mLiveSequence;
+ volatile bool & mReportingStarted;
};
void LLVOAvatarSelf::sendAppearanceChangeMetrics()
{
// gAgentAvatarp->stopAllPhases();
+ static volatile bool reporting_started(false);
+ static volatile S32 report_sequence(0);
LLSD msg = metricsData();
msg["message"] = "ViewerAppearanceChangeMetrics";
+ msg["session_id"] = gAgentSessionID;
+ msg["agent_id"] = gAgentID;
+ msg["sequence"] = report_sequence;
+ msg["initial"] = !reporting_started;
+ msg["break"] = false;
+
+ // Update sequence number
+ if (S32_MAX == ++report_sequence)
+ report_sequence = 0;
LL_DEBUGS("Avatar") << avString() << "message: " << ll_pretty_print_sd(msg) << LL_ENDL;
std::string caps_url;
@@ -2196,8 +2226,10 @@ void LLVOAvatarSelf::sendAppearanceChangeMetrics()
{
LLCurlRequest::headers_t headers;
LLHTTPClient::post(caps_url,
- msg,
- new ViewerAppearanceChangeMetricsResponder);
+ msg,
+ new ViewerAppearanceChangeMetricsResponder(report_sequence,
+ report_sequence,
+ reporting_started));
}
}