summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/lltexturefetch.cpp23
-rw-r--r--scripts/metrics/viewer_asset_logs.py2
2 files changed, 17 insertions, 8 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 7c0d02c9ca..9469a3c373 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -485,7 +485,7 @@ private:
void recordTextureStart(bool is_http);
// Threads: Ttf
- void recordTextureDone(bool is_http);
+ void recordTextureDone(bool is_http, F64 byte_count);
void lockWorkMutex() { mWorkMutex.lock(); }
void unlockWorkMutex() { mWorkMutex.unlock(); }
@@ -1426,6 +1426,13 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
if (processSimulatorPackets())
{
+ // Capture some measure of total size for metrics
+ F64 byte_count = 0;
+ for (S32 i=mFirstPacket; i<=mLastPacket; i++)
+ {
+ byte_count += mPackets[i]->mSize;
+ }
+
LL_DEBUGS(LOG_TXT) << mID << ": Loaded from Sim. Bytes: " << mFormattedImage->getDataSize() << LL_ENDL;
mFetcher->removeFromNetworkQueue(this, false);
if (mFormattedImage.isNull() || !mFormattedImage->getDataSize())
@@ -1443,7 +1450,8 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
setState(DECODE_IMAGE);
mWriteToCacheState = SHOULD_WRITE;
- recordTextureDone(false);
+
+ recordTextureDone(false, byte_count);
}
else
{
@@ -2093,7 +2101,7 @@ void LLTextureFetchWorker::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRe
mFetcher->removeFromHTTPQueue(mID, data_size);
- recordTextureDone(true);
+ recordTextureDone(true, data_size);
} // -Mw
@@ -2493,14 +2501,15 @@ void LLTextureFetchWorker::recordTextureStart(bool is_http)
// Threads: Ttf
-void LLTextureFetchWorker::recordTextureDone(bool is_http)
+void LLTextureFetchWorker::recordTextureDone(bool is_http, F64 byte_count)
{
if (mMetricsStartTime.value())
{
LLViewerAssetStatsFF::record_response(LLViewerAssetType::AT_TEXTURE,
- is_http,
- LLImageBase::TYPE_AVATAR_BAKE == mType,
- LLViewerAssetStatsFF::get_timestamp() - mMetricsStartTime);
+ is_http,
+ LLImageBase::TYPE_AVATAR_BAKE == mType,
+ LLViewerAssetStatsFF::get_timestamp() - mMetricsStartTime,
+ byte_count);
mMetricsStartTime = (U32Seconds)0;
}
LLViewerAssetStatsFF::record_dequeue(LLViewerAssetType::AT_TEXTURE,
diff --git a/scripts/metrics/viewer_asset_logs.py b/scripts/metrics/viewer_asset_logs.py
index 8e46ca4707..e48286f696 100644
--- a/scripts/metrics/viewer_asset_logs.py
+++ b/scripts/metrics/viewer_asset_logs.py
@@ -96,7 +96,7 @@ if __name__ == "__main__":
for key in sorted(stats.keys()):
val = stats[key]
if val["count"] > 0:
- print key,"count",val["count"],"mean_time",val["sum"]/val["count"],"mean_bytes",val["sum_bytes"]/val["count"],"enqueued",val["enqueued"],"dequeued",val["dequeued"]
+ print key,"count",val["count"],"mean_time",val["sum"]/val["count"],"mean_bytes",val["sum_bytes"]/val["count"],"net bytes/sec",val["sum_bytes"]/val["sum"],"enqueued",val["enqueued"],"dequeued",val["dequeued"]
else:
print key,"count",val["count"],"enqueued",val["enqueued"],"dequeued",val["dequeued"]