summaryrefslogtreecommitdiff
path: root/indra/llmessage/llassetstorage.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/llmessage/llassetstorage.cpp
parentbcd0453562e032ba1eed3858629bf8a554557543 (diff)
SL-409 - added tracking for bytes fetched to viewer assets metrics (does not currently work for textures)
Diffstat (limited to 'indra/llmessage/llassetstorage.cpp')
-rw-r--r--indra/llmessage/llassetstorage.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp
index 7bf886ef26..ab6fc69413 100644
--- a/indra/llmessage/llassetstorage.cpp
+++ b/indra/llmessage/llassetstorage.cpp
@@ -195,7 +195,8 @@ LLAssetRequest::LLAssetRequest(const LLUUID &uuid, const LLAssetType::EType type
mInfoCallback( NULL ),
mIsLocal(FALSE),
mIsUserWaiting(FALSE),
- mTimeout(LL_ASSET_STORAGE_TIMEOUT)
+ mTimeout(LL_ASSET_STORAGE_TIMEOUT),
+ mBytesFetched(0)
{
}
@@ -641,6 +642,20 @@ void LLAssetStorage::downloadCompleteCallback(
result = LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE;
vfile.remove();
}
+ else
+ {
+#if 1
+ for (request_list_t::iterator iter = gAssetStorage->mPendingDownloads.begin();
+ iter != gAssetStorage->mPendingDownloads.end(); ++iter )
+ {
+ LLAssetRequest* dlreq = *iter;
+ if ((dlreq->getUUID() == file_id) && (dlreq->getType()== file_type))
+ {
+ dlreq->mBytesFetched = vfile.getSize();
+ }
+ }
+#endif
+ }
}
removeAndCallbackPendingDownloads(file_id, file_type, callback_id, callback_type, ext_status, result);