Bug 1371205 - MEDIACACHESTREAM_NOTIFIED_LENGTH captures the HTTP header length given to MediaCacheStream - r=cpearce,francois

MozReview-Commit-ID: 9muZcpfD2vG

--HG--
extra : rebase_source : 11de88ac8f0788c3e04ef206bcdacc4ef112a139
This commit is contained in:
Gerald Squelart 2017-06-08 20:26:24 +12:00
Родитель 99357f53e9
Коммит 0fa477a0cd
2 изменённых файлов: 20 добавлений и 0 удалений

Просмотреть файл

@ -1763,6 +1763,16 @@ MediaCacheStream::NotifyDataLength(int64_t aLength)
{
NS_ASSERTION(NS_IsMainThread(), "Only call on main thread");
if (mStreamLength < 0 && aLength >= 0) {
uint32_t length = uint32_t(std::min(aLength, int64_t(UINT32_MAX)));
LOG("MediaCacheStream::NotifyDataLength(this=%p) "
"MEDIACACHESTREAM_NOTIFIED_LENGTH=%" PRIu32,
this,
length);
Telemetry::Accumulate(
Telemetry::HistogramID::MEDIACACHESTREAM_NOTIFIED_LENGTH, length);
}
ReentrantMonitorAutoEnter mon(gMediaCache->GetReentrantMonitor());
mStreamLength = aLength;
}

Просмотреть файл

@ -8442,6 +8442,16 @@
"n_buckets": 66,
"description": "MediaCacheStream stream length size in KB; Either known size from the HTTP header if available, or otherwise the size actually downloaded. Recorded at every MediaCacheStream destruction."
},
"MEDIACACHESTREAM_NOTIFIED_LENGTH": {
"record_in_processes": ["main", "content"],
"alert_emails": ["gsquelart@mozilla.com"],
"bug_numbers": [1371205],
"expires_in_version": "60",
"kind": "linear",
"high": 16777216,
"n_buckets": 66,
"description": "MediaCacheStream stream notified length size in bytes, from the HTTP header. Recorded when each MediaCacheStream is first notified."
},
"VIDEO_MFT_OUTPUT_NULL_SAMPLES": {
"record_in_processes": ["main", "content"],
"alert_emails": ["cpearce@mozilla.com"],