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

Issue 2160963002: Add watch time metrics for HTML5 media playback. (Closed)

Created:
4 years, 5 months ago by DaleCurtis
Modified:
4 years, 4 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, mlamouri (slow - plz ping)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add watch time metrics for HTML5 media playback. Watch time for our purposes is defined as the amount of elapsed media time for audio+video media. A minimum of 7 seconds of unmuted, foreground media must be watched to start watch time monitoring. Watch time is checked every 5 seconds from then on and reported to multiple buckets: All, MSE, SRC, EME, AC, and battery. Any one of paused, hidden, or muted is sufficient to stop watch time metric reports. Each of these has a hysteresis where if the state change is undone within 5 seconds, the watch time will be counted as uninterrupted. Power events (on/off battery power) have a similar hysteresis, but unlike the aforementioned properties, will not stop metric collection. Each seek event will result in a new watch time metric being started and the old metric finalized as accurately as possible. BUG=633743 TEST=new unittest. Committed: https://crrev.com/04bdb589651d194444ed3844a5495e432c0f6b3d Cr-Commit-Position: refs/heads/master@{#412664}

Patch Set 1 : Hookup, cleanup. #

Patch Set 2 : Add more tests. #

Total comments: 10

Patch Set 3 : Comments, couple more tests. #

Total comments: 11

Patch Set 4 : Only log watch time once. #

Total comments: 2

Patch Set 5 : Add tests. Report on WMP destruction. DCHECK EME. #

Patch Set 6 : Fix headers, min watch time, add non-base-zero test. #

Patch Set 7 : Send finalize signal. Allow recreation for EME. #

Patch Set 8 : Fix seeking before metadata crash. #

Total comments: 6

Patch Set 9 : Comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1210 lines, -9 lines) Patch
M content/browser/media/media_internals.cc View 1 2 3 4 5 6 6 chunks +105 lines, -6 lines 0 comments Download
M media/base/media_log.h View 1 2 3 4 5 6 1 chunk +12 lines, -0 lines 0 comments Download
M media/base/media_log.cc View 1 2 3 4 5 6 2 chunks +17 lines, -0 lines 0 comments Download
M media/base/media_log_event.h View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M media/blink/BUILD.gn View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
A media/blink/watch_time_reporter.h View 1 2 3 4 5 1 chunk +154 lines, -0 lines 0 comments Download
A media/blink/watch_time_reporter.cc View 1 2 3 4 5 6 1 chunk +262 lines, -0 lines 0 comments Download
A media/blink/watch_time_reporter_unittest.cc View 1 2 3 4 5 6 1 chunk +548 lines, -0 lines 0 comments Download
M media/blink/webmediaplayer_impl.h View 1 2 3 4 5 6 3 chunks +7 lines, -0 lines 0 comments Download
M media/blink/webmediaplayer_impl.cc View 1 2 3 4 5 6 7 8 16 chunks +59 lines, -2 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 2 chunks +39 lines, -0 lines 0 comments Download

Messages

Total messages: 59 (29 generated)
DaleCurtis
This is now ready for review. I'm still in the process of adding unit tests ...
4 years, 4 months ago (2016-08-02 22:22:45 UTC) #5
DaleCurtis
+holte for UMA review, but prior to review please help me figure out how I'm ...
4 years, 4 months ago (2016-08-03 00:32:41 UTC) #7
Steven Holte
On 2016/08/03 00:32:41, DaleCurtis wrote: > +holte for UMA review, but prior to review please ...
4 years, 4 months ago (2016-08-03 20:49:59 UTC) #8
DaleCurtis
On 2016/08/03 at 20:49:59, holte wrote: > On 2016/08/03 00:32:41, DaleCurtis wrote: > > +holte ...
4 years, 4 months ago (2016-08-03 21:18:24 UTC) #9
sandersd (OOO until July 31)
https://codereview.chromium.org/2160963002/diff/60001/media/blink/watch_time_reporter.cc File media/blink/watch_time_reporter.cc (right): https://codereview.chromium.org/2160963002/diff/60001/media/blink/watch_time_reporter.cc#newcode105 media/blink/watch_time_reporter.cc:105: FinalizeWatchTime(FinalizeTime::ON_NEXT_UPDATE); It looks like this is correct in the ...
4 years, 4 months ago (2016-08-03 22:45:59 UTC) #10
DaleCurtis
Addressed comments, added a few more tests. Still adding more tests, but in the interest ...
4 years, 4 months ago (2016-08-04 19:14:59 UTC) #12
sandersd (OOO until July 31)
https://codereview.chromium.org/2160963002/diff/60001/media/blink/watch_time_reporter.cc File media/blink/watch_time_reporter.cc (right): https://codereview.chromium.org/2160963002/diff/60001/media/blink/watch_time_reporter.cc#newcode105 media/blink/watch_time_reporter.cc:105: FinalizeWatchTime(FinalizeTime::ON_NEXT_UPDATE); On 2016/08/04 19:14:59, DaleCurtis wrote: > On 2016/08/03 ...
4 years, 4 months ago (2016-08-04 20:01:00 UTC) #13
DaleCurtis
https://codereview.chromium.org/2160963002/diff/60001/media/blink/watch_time_reporter.cc File media/blink/watch_time_reporter.cc (right): https://codereview.chromium.org/2160963002/diff/60001/media/blink/watch_time_reporter.cc#newcode105 media/blink/watch_time_reporter.cc:105: FinalizeWatchTime(FinalizeTime::ON_NEXT_UPDATE); On 2016/08/04 at 20:01:00, sandersd wrote: > On ...
4 years, 4 months ago (2016-08-04 20:10:13 UTC) #14
Steven Holte
lgtm
4 years, 4 months ago (2016-08-04 22:06:17 UTC) #15
sandersd (OOO until July 31)
https://codereview.chromium.org/2160963002/diff/80001/media/blink/watch_time_reporter.cc File media/blink/watch_time_reporter.cc (right): https://codereview.chromium.org/2160963002/diff/80001/media/blink/watch_time_reporter.cc#newcode205 media/blink/watch_time_reporter.cc:205: UMA_HISTOGRAM_LONG_TIMES(kHistogramAudioVideoAll, elapsed); It looks like this will report repeatedly, ...
4 years, 4 months ago (2016-08-04 23:06:27 UTC) #16
DaleCurtis
https://codereview.chromium.org/2160963002/diff/80001/media/blink/watch_time_reporter.cc File media/blink/watch_time_reporter.cc (right): https://codereview.chromium.org/2160963002/diff/80001/media/blink/watch_time_reporter.cc#newcode205 media/blink/watch_time_reporter.cc:205: UMA_HISTOGRAM_LONG_TIMES(kHistogramAudioVideoAll, elapsed); On 2016/08/04 at 23:06:26, sandersd wrote: > ...
4 years, 4 months ago (2016-08-04 23:34:21 UTC) #17
sandersd (OOO until July 31)
> No coalescing, we end up with categories like the following: > > 50% watched ...
4 years, 4 months ago (2016-08-04 23:41:01 UTC) #18
sandersd (OOO until July 31)
https://codereview.chromium.org/2160963002/diff/80001/media/blink/watch_time_reporter.cc File media/blink/watch_time_reporter.cc (right): https://codereview.chromium.org/2160963002/diff/80001/media/blink/watch_time_reporter.cc#newcode205 media/blink/watch_time_reporter.cc:205: UMA_HISTOGRAM_LONG_TIMES(kHistogramAudioVideoAll, elapsed); On 2016/08/04 23:34:21, DaleCurtis wrote: > On ...
4 years, 4 months ago (2016-08-04 23:57:18 UTC) #19
Steven Holte
On 2016/08/04 23:57:18, sandersd wrote: > https://codereview.chromium.org/2160963002/diff/80001/media/blink/watch_time_reporter.cc > File media/blink/watch_time_reporter.cc (right): > > https://codereview.chromium.org/2160963002/diff/80001/media/blink/watch_time_reporter.cc#newcode205 > ...
4 years, 4 months ago (2016-08-05 00:44:40 UTC) #20
DaleCurtis
Latest patch set sends MediaLog events over to the browser process on a regular basis ...
4 years, 4 months ago (2016-08-08 23:16:42 UTC) #21
sandersd (OOO until July 31)
lgtm https://codereview.chromium.org/2160963002/diff/100001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2160963002/diff/100001/tools/metrics/histograms/histograms.xml#newcode23306 tools/metrics/histograms/histograms.xml:23306: + media. A minimum of 7 seconds of ...
4 years, 4 months ago (2016-08-09 18:31:20 UTC) #22
Steven Holte
On 2016/08/08 23:16:42, DaleCurtis wrote: > Latest patch set sends MediaLog events over to the ...
4 years, 4 months ago (2016-08-09 19:42:34 UTC) #23
DaleCurtis
Thanks for the review. I've used the suggested buckets and added a whole bunch of ...
4 years, 4 months ago (2016-08-12 00:07:02 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/2160963002/180001
4 years, 4 months ago (2016-08-12 00:40:37 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/206471)
4 years, 4 months ago (2016-08-12 00:47:47 UTC) #32
watk
This is minor, but should we start the buckets at a higher number since we're ...
4 years, 4 months ago (2016-08-12 01:01:17 UTC) #33
DaleCurtis
Good catch Chris. I've set the histogram to start at 7 seconds. I've also moved ...
4 years, 4 months ago (2016-08-15 17:37:13 UTC) #36
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/2160963002/220001
4 years, 4 months ago (2016-08-15 17:37:29 UTC) #38
commit-bot: I haz the power
Exceeded global retry quota
4 years, 4 months ago (2016-08-15 18:07:32 UTC) #40
DaleCurtis
sandersd@ PTAL, in the transition to MediaInternals we lost some intrinsic behavior around finalization of ...
4 years, 4 months ago (2016-08-15 19:00:13 UTC) #42
sandersd (OOO until July 31)
lgtm, just nits. https://codereview.chromium.org/2160963002/diff/300001/media/blink/webmediaplayer_impl.cc File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/2160963002/diff/300001/media/blink/webmediaplayer_impl.cc#newcode412 media/blink/webmediaplayer_impl.cc:412: watch_time_reporter_->OnPlaying(); Perhaps add conditions (or at ...
4 years, 4 months ago (2016-08-17 01:11:25 UTC) #52
DaleCurtis
https://codereview.chromium.org/2160963002/diff/300001/media/blink/webmediaplayer_impl.cc File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/2160963002/diff/300001/media/blink/webmediaplayer_impl.cc#newcode412 media/blink/webmediaplayer_impl.cc:412: watch_time_reporter_->OnPlaying(); On 2016/08/17 at 01:11:25, sandersd wrote: > Perhaps ...
4 years, 4 months ago (2016-08-17 20:30:44 UTC) #54
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/2160963002/320001
4 years, 4 months ago (2016-08-17 20:31:03 UTC) #56
commit-bot: I haz the power
Committed patchset #9 (id:320001)
4 years, 4 months ago (2016-08-17 22:15:42 UTC) #57
commit-bot: I haz the power
4 years, 4 months ago (2016-08-17 22:21:44 UTC) #59
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/04bdb589651d194444ed3844a5495e432c0f6b3d
Cr-Commit-Position: refs/heads/master@{#412664}

Powered by Google App Engine
This is Rietveld 408576698