summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerassetstorage.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-03-03 15:14:09 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-03-03 15:14:09 -0500
commitf70abb4ad628b19c993a22c7e86d350395555fcf (patch)
treefcee761280477842d967b485f23bfc35ec927107 /indra/newview/llviewerassetstorage.cpp
parentbcd0453562e032ba1eed3858629bf8a554557543 (diff)
SL-409 - added tracking for bytes fetched to viewer assets metrics (does not currently work for textures)
Diffstat (limited to 'indra/newview/llviewerassetstorage.cpp')
-rw-r--r--indra/newview/llviewerassetstorage.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index 85150bf7fa..fa3567620c 100644
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -82,7 +82,8 @@ protected:
LLViewerAssetStatsFF::record_dequeue(mType, mWithHTTP, false);
LLViewerAssetStatsFF::record_response(mType, mWithHTTP, false,
(LLViewerAssetStatsFF::get_timestamp()
- - mMetricsStartTime));
+ - mMetricsStartTime),
+ mBytesFetched);
mMetricsStartTime = (U32Seconds)0;
}
}
@@ -458,12 +459,13 @@ void LLViewerAssetStorage::queueRequestHttp(
LLViewerAssetStatsFF::record_enqueue(atype, with_http, is_temp);
LLCoros::instance().launch("LLViewerAssetStorage::assetRequestCoro",
- boost::bind(&LLViewerAssetStorage::assetRequestCoro, this, uuid, atype, callback, user_data));
+ boost::bind(&LLViewerAssetStorage::assetRequestCoro, this, req, uuid, atype, callback, user_data));
}
}
}
void LLViewerAssetStorage::assetRequestCoro(
+ LLViewerAssetRequest *req,
const LLUUID& uuid,
LLAssetType::EType atype,
LLGetAssetCallback callback,
@@ -506,6 +508,7 @@ void LLViewerAssetStorage::assetRequestCoro(
temp_id.generate();
LLVFile vf(gAssetStorage->mVFS, temp_id, atype, LLVFile::WRITE);
vf.setMaxSize(size);
+ req->mBytesFetched = size;
if (!vf.write(raw.data(),size))
{
// TODO asset-http: handle error