mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1366929 - Telemetry: Watermark (in KB) reached by each MediaCache session - r=cpearce
MozReview-Commit-ID: 6BDFFYq1JnJ --HG-- extra : rebase_source : dd67c472369d3c0db714333e1eb9f7c665514b17
This commit is contained in:
parent
4f4bcfd98c
commit
8183f3fe78
@ -19,6 +19,7 @@
|
||||
#include "nsIPrincipal.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include <algorithm>
|
||||
|
||||
namespace mozilla {
|
||||
@ -126,6 +127,11 @@ public:
|
||||
mFileCache->Close();
|
||||
mFileCache = nullptr;
|
||||
}
|
||||
LOG("MediaCache::~MediaCache(this=%p) MEDIACACHE_WATERMARK_KB=%u",
|
||||
this, unsigned(mIndexWatermark * MediaCache::BLOCK_SIZE / 1024));
|
||||
Telemetry::Accumulate(
|
||||
Telemetry::HistogramID::MEDIACACHE_WATERMARK_KB,
|
||||
uint32_t(mIndexWatermark * MediaCache::BLOCK_SIZE / 1024));
|
||||
MOZ_COUNT_DTOR(MediaCache);
|
||||
}
|
||||
|
||||
@ -348,6 +354,8 @@ protected:
|
||||
nsTArray<MediaCacheStream*> mStreams;
|
||||
// The Blocks describing the cache entries.
|
||||
nsTArray<Block> mIndex;
|
||||
// Keep track for highest number of blocks used, for telemetry purposes.
|
||||
int32_t mIndexWatermark = 0;
|
||||
// Writer which performs IO, asynchronously writing cache blocks.
|
||||
RefPtr<FileBlockCache> mFileCache;
|
||||
// The list of free blocks; they are not ordered.
|
||||
@ -720,6 +728,7 @@ MediaCache::FindBlockForIncomingData(TimeStamp aNow,
|
||||
blockIndex = mIndex.Length();
|
||||
if (!mIndex.AppendElement())
|
||||
return -1;
|
||||
mIndexWatermark = std::max(mIndexWatermark, blockIndex + 1);
|
||||
mFreeBlocks.AddFirstBlock(blockIndex);
|
||||
return blockIndex;
|
||||
}
|
||||
|
@ -8330,6 +8330,16 @@
|
||||
"n_values": 50,
|
||||
"description": "Counts of the maximum number of shared memory buffers used for transferring video frames between the CDM and Gecko processes during playback of DRM'd video. Reported once per CDMVideoDecoder instance, i.e., once per JavaScript SourceBuffer during playback of video using EME."
|
||||
},
|
||||
"MEDIACACHE_WATERMARK_KB": {
|
||||
"record_in_processes": ["main", "content"],
|
||||
"alert_emails": ["gsquelart@mozilla.com"],
|
||||
"bug_numbers": [1366929],
|
||||
"expires_in_version": "60",
|
||||
"kind": "linear",
|
||||
"high": 520000,
|
||||
"n_buckets": 66,
|
||||
"description": "Maximum MediaCache buffer size reached, in KB. Recorded at every MediaCache destruction, i.e., whenever there is no more media data to be downloaded or kept for playback."
|
||||
},
|
||||
"VIDEO_MFT_OUTPUT_NULL_SAMPLES": {
|
||||
"record_in_processes": ["main", "content"],
|
||||
"alert_emails": ["cpearce@mozilla.com"],
|
||||
|
Loading…
Reference in New Issue
Block a user