diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-03-03 15:14:09 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-03-03 15:14:09 -0500 |
commit | f70abb4ad628b19c993a22c7e86d350395555fcf (patch) | |
tree | fcee761280477842d967b485f23bfc35ec927107 /indra/llmessage | |
parent | bcd0453562e032ba1eed3858629bf8a554557543 (diff) |
SL-409 - added tracking for bytes fetched to viewer assets metrics (does not currently work for textures)
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llassetstorage.cpp | 17 | ||||
-rw-r--r-- | indra/llmessage/llassetstorage.h | 1 |
2 files changed, 17 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); diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h index 2ec8ac31b4..d6b4fa0c7b 100644 --- a/indra/llmessage/llassetstorage.h +++ b/indra/llmessage/llassetstorage.h @@ -138,6 +138,7 @@ public: BOOL mIsUserWaiting; // We don't want to try forever if a user is waiting for a result. F64Seconds mTimeout; // Amount of time before timing out. LLUUID mRequestingAgentID; // Only valid for uploads from an agent + F64 mBytesFetched; virtual LLSD getTerseDetails() const; virtual LLSD getFullDetails() const; |