Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Issue 2471903002: Add MediaServiceThrottler (Closed)

Created:
4 years, 1 month ago by tguilbert
Modified:
4 years, 1 month ago
CC:
agrieve+watch_chromium.org, avayvod+watch_chromium.org, chromium-reviews, feature-media-reviews_chromium.org, mlamouri+watch-media_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add MediaServiceThrottler WMPA used the MediaThrottler to display a notification bar to the user if an unusual number of media server crashes were detected. This was done in order to prevent a webpage from loading the same url over and over in order to crash the Media Server. This change introduces the MediaServerCrashListener which reuses the same technique that the MediaThrottler used to monitor for Media Server crashes. It also introduces the MediaServiceThrottler which uses the MediaServerCrashListener, and exponentially delays the creation of new clients (MediaPlayerBridges for now) based on the number of Media Server crashes. The MediaServiceThrottler resets its internal clock state after a minute of not having schedule new client creations, and reset its crash counter after a minute of not having detected any crashes. It also support "burst scheduling", allowing for a fixed number of clients to be scheduled immediately within some sliding window, in order to minimize impact from multiple requests coming in from new page loads. BUG=636615 TEST=Added UTs Committed: https://crrev.com/f524383bbd03acfba4ffe18b7e77a66c46228dcd Cr-Commit-Position: refs/heads/master@{#432712}

Patch Set 1 #

Patch Set 2 : Added comments and UTs #

Patch Set 3 : Integrate throttler into MediaPlayerRender #

Total comments: 55

Patch Set 4 : Release resources after 1 min. +2 UTS. #

Total comments: 43

Patch Set 5 : Addressing comments #

Patch Set 6 : Release watchdog MediaPlayer on crash #

Patch Set 7 : Limit crashes from watchdog creation failures #

Total comments: 8

Patch Set 8 : Adressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+927 lines, -3 lines) Patch
M content/browser/media/android/media_player_renderer.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/media/android/media_player_renderer.cc View 1 2 3 4 4 chunks +27 lines, -3 lines 0 comments Download
M media/base/android/BUILD.gn View 1 2 5 chunks +8 lines, -0 lines 0 comments Download
A media/base/android/java/src/org/chromium/media/MediaServerCrashListener.java View 1 2 3 4 5 6 7 1 chunk +109 lines, -0 lines 0 comments Download
A media/base/android/media_server_crash_listener.h View 1 2 3 4 5 6 7 1 chunk +60 lines, -0 lines 0 comments Download
A media/base/android/media_server_crash_listener.cc View 1 2 3 4 5 6 7 1 chunk +55 lines, -0 lines 0 comments Download
A media/base/android/media_service_throttler.h View 1 2 3 4 5 6 7 1 chunk +118 lines, -0 lines 0 comments Download
A media/base/android/media_service_throttler.cc View 1 2 3 4 5 6 7 1 chunk +236 lines, -0 lines 0 comments Download
A media/base/android/media_service_throttler_unittest.cc View 1 2 3 4 5 6 7 1 chunk +311 lines, -0 lines 0 comments Download

Messages

Total messages: 41 (19 generated)
tguilbert
PTAL! Thank you :)
4 years, 1 month ago (2016-11-04 22:07:38 UTC) #4
tguilbert
On 2016/11/04 22:07:38, tguilbert wrote: > PTAL! Thank you :) (I will be adding the ...
4 years, 1 month ago (2016-11-04 22:08:29 UTC) #6
DaleCurtis
The old throttler shut down when there were no media player instances outstanding. Do we ...
4 years, 1 month ago (2016-11-04 22:15:56 UTC) #8
tguilbert
On 2016/11/04 22:15:56, DaleCurtis wrote: > The old throttler shut down when there were no ...
4 years, 1 month ago (2016-11-07 22:50:03 UTC) #11
DaleCurtis
https://codereview.chromium.org/2471903002/diff/40001/content/browser/media/android/media_player_renderer.cc File content/browser/media/android/media_player_renderer.cc (right): https://codereview.chromium.org/2471903002/diff/40001/content/browser/media/android/media_player_renderer.cc#newcode47 content/browser/media/android/media_player_renderer.cc:47: BrowserThread::PostDelayedTask( Worth skipping post if it's schedule == 0? ...
4 years, 1 month ago (2016-11-08 22:35:41 UTC) #12
sandersd (OOO until July 31)
https://codereview.chromium.org/2471903002/diff/40001/content/browser/media/android/media_player_renderer.cc File content/browser/media/android/media_player_renderer.cc (right): https://codereview.chromium.org/2471903002/diff/40001/content/browser/media/android/media_player_renderer.cc#newcode54 content/browser/media/android/media_player_renderer.cc:54: void MediaPlayerRenderer::InitializeInternal( Rename to make the purpose more clear. ...
4 years, 1 month ago (2016-11-08 22:53:45 UTC) #13
tguilbert
Addressed comments and added 2 UTs. PTAL, thank you! https://codereview.chromium.org/2471903002/diff/40001/content/browser/media/android/media_player_renderer.cc File content/browser/media/android/media_player_renderer.cc (right): https://codereview.chromium.org/2471903002/diff/40001/content/browser/media/android/media_player_renderer.cc#newcode47 content/browser/media/android/media_player_renderer.cc:47: ...
4 years, 1 month ago (2016-11-11 03:50:30 UTC) #14
sandersd (OOO until July 31)
https://codereview.chromium.org/2471903002/diff/60001/media/base/android/java/src/org/chromium/media/MediaServerCrashListener.java File media/base/android/java/src/org/chromium/media/MediaServerCrashListener.java (right): https://codereview.chromium.org/2471903002/diff/60001/media/base/android/java/src/org/chromium/media/MediaServerCrashListener.java#newcode58 media/base/android/java/src/org/chromium/media/MediaServerCrashListener.java:58: Log.e(TAG, "Exception happens while creating the watch dog player.", ...
4 years, 1 month ago (2016-11-11 18:55:14 UTC) #15
DaleCurtis
https://codereview.chromium.org/2471903002/diff/60001/content/browser/media/android/media_player_renderer.cc File content/browser/media/android/media_player_renderer.cc (right): https://codereview.chromium.org/2471903002/diff/60001/content/browser/media/android/media_player_renderer.cc#newcode53 content/browser/media/android/media_player_renderer.cc:53: pending_init_cb_ = init_cb; Bind it into CreateMediaPlayer instead? https://codereview.chromium.org/2471903002/diff/60001/content/browser/media/android/media_player_renderer.h ...
4 years, 1 month ago (2016-11-11 23:32:16 UTC) #16
watk
Just drive by nits https://codereview.chromium.org/2471903002/diff/60001/media/base/android/java/src/org/chromium/media/MediaServerCrashListener.java File media/base/android/java/src/org/chromium/media/MediaServerCrashListener.java (right): https://codereview.chromium.org/2471903002/diff/60001/media/base/android/java/src/org/chromium/media/MediaServerCrashListener.java#newcode17 media/base/android/java/src/org/chromium/media/MediaServerCrashListener.java:17: * Class for listening to ...
4 years, 1 month ago (2016-11-12 04:22:16 UTC) #18
tguilbert
PTAL! Addressed comments. Also, sorry to change this up this late in a review, but ...
4 years, 1 month ago (2016-11-14 23:18:08 UTC) #19
DaleCurtis
lgtm https://codereview.chromium.org/2471903002/diff/120001/media/base/android/java/src/org/chromium/media/MediaServerCrashListener.java File media/base/android/java/src/org/chromium/media/MediaServerCrashListener.java (right): https://codereview.chromium.org/2471903002/diff/120001/media/base/android/java/src/org/chromium/media/MediaServerCrashListener.java#newcode23 media/base/android/java/src/org/chromium/media/MediaServerCrashListener.java:23: private static final String TAG = "crMediaCrashListener"; Don't ...
4 years, 1 month ago (2016-11-15 00:49:32 UTC) #20
tguilbert
PTAL :) https://codereview.chromium.org/2471903002/diff/120001/media/base/android/java/src/org/chromium/media/MediaServerCrashListener.java File media/base/android/java/src/org/chromium/media/MediaServerCrashListener.java (right): https://codereview.chromium.org/2471903002/diff/120001/media/base/android/java/src/org/chromium/media/MediaServerCrashListener.java#newcode23 media/base/android/java/src/org/chromium/media/MediaServerCrashListener.java:23: private static final String TAG = "crMediaCrashListener"; ...
4 years, 1 month ago (2016-11-15 19:29:07 UTC) #25
DaleCurtis
Still lgtm
4 years, 1 month ago (2016-11-15 20:44:19 UTC) #26
sandersd (OOO until July 31)
lgtm
4 years, 1 month ago (2016-11-15 20:49:05 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2471903002/140001
4 years, 1 month ago (2016-11-16 21:18:56 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/336933)
4 years, 1 month ago (2016-11-16 22:38:03 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2471903002/140001
4 years, 1 month ago (2016-11-16 23:11:52 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/318654)
4 years, 1 month ago (2016-11-17 00:07:08 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2471903002/140001
4 years, 1 month ago (2016-11-17 00:09:03 UTC) #37
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 1 month ago (2016-11-17 02:40:04 UTC) #39
commit-bot: I haz the power
4 years, 1 month ago (2016-11-17 02:50:17 UTC) #41
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/f524383bbd03acfba4ffe18b7e77a66c46228dcd
Cr-Commit-Position: refs/heads/master@{#432712}

Powered by Google App Engine
This is Rietveld 408576698