mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1366936 - Telemetry: Watermark of number of block owners during MediaCache sessions - r=cpearce,francois
MozReview-Commit-ID: Ed1Eah9TuSJ --HG-- extra : rebase_source : b539ba0f551c821d0b093435f0fdba958ecd3aaa
This commit is contained in:
parent
06e123e689
commit
4d566af858
@ -132,6 +132,12 @@ public:
|
||||
Telemetry::Accumulate(
|
||||
Telemetry::HistogramID::MEDIACACHE_WATERMARK_KB,
|
||||
uint32_t(mIndexWatermark * MediaCache::BLOCK_SIZE / 1024));
|
||||
LOG("MediaCache::~MediaCache(this=%p) MEDIACACHE_BLOCKOWNERS_WATERMARK=%u",
|
||||
this, unsigned(mBlockOwnersWatermark));
|
||||
Telemetry::Accumulate(
|
||||
Telemetry::HistogramID::MEDIACACHE_BLOCKOWNERS_WATERMARK,
|
||||
mBlockOwnersWatermark);
|
||||
|
||||
MOZ_COUNT_DTOR(MediaCache);
|
||||
}
|
||||
|
||||
@ -356,6 +362,8 @@ protected:
|
||||
nsTArray<Block> mIndex;
|
||||
// Keep track for highest number of blocks used, for telemetry purposes.
|
||||
int32_t mIndexWatermark = 0;
|
||||
// Keep track for highest number of blocks owners, for telemetry purposes.
|
||||
uint32_t mBlockOwnersWatermark = 0;
|
||||
// Writer which performs IO, asynchronously writing cache blocks.
|
||||
RefPtr<FileBlockCache> mFileCache;
|
||||
// The list of free blocks; they are not ordered.
|
||||
@ -943,6 +951,8 @@ MediaCache::AddBlockOwnerAsReadahead(int32_t aBlockIndex,
|
||||
mFreeBlocks.RemoveBlock(aBlockIndex);
|
||||
}
|
||||
BlockOwner* bo = block->mOwners.AppendElement();
|
||||
mBlockOwnersWatermark =
|
||||
std::max(mBlockOwnersWatermark, uint32_t(block->mOwners.Length()));
|
||||
bo->mStream = aStream;
|
||||
bo->mStreamBlock = aStreamBlockIndex;
|
||||
aStream->mBlocks[aStreamBlockIndex] = aBlockIndex;
|
||||
@ -1540,6 +1550,8 @@ MediaCache::AllocateAndWriteBlock(
|
||||
block->mOwners.Clear();
|
||||
return;
|
||||
}
|
||||
mBlockOwnersWatermark =
|
||||
std::max(mBlockOwnersWatermark, uint32_t(block->mOwners.Length()));
|
||||
bo->mStream = stream;
|
||||
}
|
||||
|
||||
|
@ -8340,6 +8340,15 @@
|
||||
"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."
|
||||
},
|
||||
"MEDIACACHE_BLOCKOWNERS_WATERMARK": {
|
||||
"record_in_processes": ["main", "content"],
|
||||
"alert_emails": ["gsquelart@mozilla.com"],
|
||||
"bug_numbers": [1366936],
|
||||
"expires_in_version": "60",
|
||||
"kind": "enumerated",
|
||||
"n_values": 32,
|
||||
"description": "Maximum number of owners for each MediaCache block. 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