SH-2970 WIP - avatar metrics

meow-7.2.2
Brad Payne (Vir Linden) 2012-03-03 06:59:34 -05:00
parent 7b3f721e7a
commit a37e121dbf
5 changed files with 41 additions and 7 deletions

View File

@ -7150,6 +7150,17 @@
<key>Value</key>
<integer>-1</integer>
</map>
<key>QAModeMetrics</key>
<map>
<key>Comment</key>
<string>"Enables QA features (logging, faster cycling) for metrics collector"</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>QuietSnapshotsToDisk</key>
<map>
<key>Comment</key>

View File

@ -730,12 +730,12 @@ bool LLAppViewer::init()
{
// Viewer metrics initialization
static LLCachedControl<bool> metrics_submode(gSavedSettings,
"QAModeMetrics",
false,
"Enables QA features (logging, faster cycling) for metrics collector");
//static LLCachedControl<bool> metrics_submode(gSavedSettings,
// "QAModeMetrics",
// false,
// "Enables QA features (logging, faster cycling) for metrics collector");
if (metrics_submode)
if (gSavedSettings.getBOOL("QAModeMetrics"))
{
app_metrics_qa_mode = true;
app_metrics_interval = METRICS_INTERVAL_QA;
@ -4244,7 +4244,8 @@ void LLAppViewer::idle()
static LLTimer report_interval;
// *TODO: Add configuration controls for this
if (report_interval.getElapsedTimeF32() >= app_metrics_interval)
F32 seconds = report_interval.getElapsedTimeF32();
if (seconds >= app_metrics_interval)
{
metricsSend(! gDisconnected);
report_interval.reset();

View File

@ -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++)

View File

@ -281,6 +281,7 @@ public:
virtual BOOL getIsCloud() const;
BOOL isFullyTextured() const;
BOOL hasGray() const;
S32 getRezzedStatus() const; // 0 = cloud, 1 = gray, 2 = fully textured.
protected:
BOOL updateIsFullyLoaded();
BOOL processFullyLoadedChange(bool loading);
@ -988,6 +989,8 @@ private:
public:
void debugAvatarRezTime(std::string notification_name, std::string comment = "");
F32 debugGetExistenceTimeElapsedF32() const { return mDebugExistenceTimer.getElapsedTimeF32(); }
LLSD metricsData();
protected:
LLFrameTimer mRuthDebugTimer; // For tracking how long it takes for av to rez
LLFrameTimer mDebugExistenceTimer; // Debugging for how long the avatar has been in memory.

View File

@ -2278,7 +2278,7 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid )
}
}
// FIXME: This is never called. Something may be broken.
// FIXME: This is not called consistently. Something may be broken.
void LLVOAvatarSelf::outputRezDiagnostics() const
{
if(!gSavedSettings.getBOOL("DebugAvatarLocalTexLoadedTime"))