Ensure we exercise both FileBlockCache and MemoryBlockCache in media tests

RESOLVED FIXED in Firefox 56

Status

()

Core
Audio/Video: Playback
RESOLVED FIXED
6 months ago
6 months ago

People

(Reporter: gerald, Assigned: gerald)

Tracking

(Blocks: 1 bug)

56 Branch
mozilla56
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox56 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

6 months ago
Following bug 1371882, media resources with a known length of less than 8MB will use MemoryBlockCache-backed MediaCache.
Since most of our media tests use small files, we may not be exercising FileBlockCache anymore, or at least not that much.

I've started the following try, with printfs that will show us what sizes are given to MediaCache during tests, and which block cache is used based on that:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=5a1fadf34de385cb1dd72344179aac46e2a49e2e

After gathering numbers from this test, we can set a more appropriate "media.memory_cache_max_size" in test environments, to ensure that we have a roughly equal use of both FileBlockCache and MemoryBlockCache during our try runs.
(Assignee)

Comment 1

6 months ago
Results are in: There are very few '-1' content lengths that make us use FileBlockCache, so we definitely should adjust the threshold for our tests.
The median is at 22094, the two powers of two around it are:
- 16384, which would split the tests 38% memory / 62% file
- 32768, for a 65/35 split.
I will go with 32768, which tests the new MemoryBlockCache a bit more (and hopefully makes tests faster too!), but with still plenty of tests exercising FileBlockCache.
Comment hidden (mozreview-request)
(Assignee)

Comment 3

6 months ago
I've started a new Try [1] with this patch and the same printfs, and I'm getting expected results with a around 63% mem / 37% file caches -- A few more FileBlockCaches than I indicated in comment 1, because I've also set "media.memory_caches_combined_limit_kb" to 256KB to exercise code for that limit.

[1] https://treeherder.mozilla.org/#/jobs?repo=try&revision=6e9e24aae0e0ab8ebf856ab7339ea84b6438fd79

Comment 4

6 months ago
mozreview-review
Comment on attachment 8879800 [details]
Bug 1374545 - Tests use media.memory_cache_max_size=32KB to exercise both memory&file caches -

https://reviewboard.mozilla.org/r/151188/#review156040

Great, thanks!
Attachment #8879800 - Flags: review?(cpearce) → review+

Comment 5

6 months ago
Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4b4c9dbb1656
Tests use media.memory_cache_max_size=32KB to exercise both memory&file caches - r=cpearce

Comment 6

6 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/4b4c9dbb1656
Status: NEW → RESOLVED
Last Resolved: 6 months ago
status-firefox56: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.