summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerassetstats.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/llviewerassetstats.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/llviewerassetstats.cpp')
-rw-r--r--indra/newview/llviewerassetstats.cpp10
1 files changed, 7 insertions, 3 deletions
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()