summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llerror.cpp2
-rw-r--r--indra/llmessage/llassetstorage.cpp17
-rw-r--r--indra/llmessage/llassetstorage.h1
-rw-r--r--indra/newview/llviewerassetstats.cpp10
-rw-r--r--indra/newview/llviewerassetstats.h9
-rw-r--r--indra/newview/llviewerassetstorage.cpp7
-rw-r--r--indra/newview/llviewerassetstorage.h5
7 files changed, 39 insertions, 12 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index e6407ecf22..9c49f7eff4 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -572,7 +572,7 @@ namespace LLError
mFunctionString += std::string(mFunction) + ":";
for (size_t i = 0; i < mTagCount; i++)
{
- mTagString += std::string("#") + mTags[i] + ((i == mTagCount - 1) ? "" : ",");
+ mTagString += std::string("#") + mTags[i] + ((i == mTagCount - 1) ? " " : ",");
}
}
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;
diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp
index d47f73ccce..a9e0ba7b5d 100644
--- a/indra/newview/llviewerassetstats.cpp
+++ b/indra/newview/llviewerassetstats.cpp
@@ -168,6 +168,7 @@ namespace LLViewerAssetStatsFF
static LLTrace::DCCountStatHandle<> sEnqueued[EVACCount];
static LLTrace::DCCountStatHandle<> sDequeued[EVACCount];
+ static LLTrace::DCEventStatHandle<> sBytesFetched[EVACCount];
static LLTrace::DCEventStatHandle<F64Seconds > sResponse[EVACCount];
}
@@ -277,7 +278,8 @@ void LLViewerAssetStats::getStat(LLTrace::Recording& rec, T& req, LLViewerAssetS
.resp_count(rec.getSampleCount(sResponse[cat]))
.resp_min(rec.getMin(sResponse[cat]).value())
.resp_max(rec.getMax(sResponse[cat]).value())
- .resp_mean(rec.getMean(sResponse[cat]).value());
+ .resp_mean(rec.getMean(sResponse[cat]).value())
+ .resp_mean_bytes(rec.getMean(sBytesFetched[cat]));
}
}
@@ -370,11 +372,12 @@ void record_dequeue(LLViewerAssetType::EType at, bool with_http, bool is_temp)
add(sDequeued[int(eac)], 1);
}
-void record_response(LLViewerAssetType::EType at, bool with_http, bool is_temp, LLViewerAssetStats::duration_t duration)
+void record_response(LLViewerAssetType::EType at, bool with_http, bool is_temp, LLViewerAssetStats::duration_t duration, F64 bytes)
{
const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp));
record(sResponse[int(eac)], F64Microseconds(duration));
+ record(sBytesFetched[int(eac)], bytes);
}
void init()
@@ -403,7 +406,8 @@ LLViewerAssetStats::AssetRequestType::AssetRequestType()
resp_count("resp_count"),
resp_min("resp_min"),
resp_max("resp_max"),
- resp_mean("resp_mean")
+ resp_mean("resp_mean"),
+ resp_mean_bytes("resp_mean_bytes")
{}
LLViewerAssetStats::FPSStats::FPSStats()
diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h
index a2545c0bad..718c284224 100644
--- a/indra/newview/llviewerassetstats.h
+++ b/indra/newview/llviewerassetstats.h
@@ -118,11 +118,12 @@ public:
struct AssetRequestType : public LLInitParam::Block<AssetRequestType>
{
Mandatory<S32> enqueued,
- dequeued,
- resp_count;
+ dequeued,
+ resp_count;
Mandatory<F64> resp_min,
resp_max,
- resp_mean;
+ resp_mean,
+ resp_mean_bytes;
AssetRequestType();
};
@@ -272,7 +273,7 @@ void record_enqueue(LLViewerAssetType::EType at, bool with_http, bool is_temp);
void record_dequeue(LLViewerAssetType::EType at, bool with_http, bool is_temp);
void record_response(LLViewerAssetType::EType at, bool with_http, bool is_temp,
- LLViewerAssetStats::duration_t duration);
+ LLViewerAssetStats::duration_t duration, F64 bytes=0);
void record_avatar_stats();
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
diff --git a/indra/newview/llviewerassetstorage.h b/indra/newview/llviewerassetstorage.h
index d28a8a276f..3ca8112601 100644
--- a/indra/newview/llviewerassetstorage.h
+++ b/indra/newview/llviewerassetstorage.h
@@ -31,6 +31,8 @@
class LLVFile;
+class LLViewerAssetRequest;
+
class LLViewerAssetStorage : public LLAssetStorage
{
public:
@@ -85,7 +87,8 @@ protected:
BOOL duplicate,
BOOL is_priority);
- void assetRequestCoro(const LLUUID& uuid,
+ void assetRequestCoro(LLViewerAssetRequest *req,
+ const LLUUID& uuid,
LLAssetType::EType atype,
void (*callback) (LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat),
void *user_data);