Bug 1416141 - Remove Telemetry VIDEO_EME_PLAY_SUCCESS. r=kikuo
authorJames Cheng <jacheng@mozilla.com>
Fri, 10 Nov 2017 14:49:37 +0800
changeset 391205 270709ba8f6796dd655b782a80e6ced6eafc5b78
parent 391204 4e6d62124ec0c017f219f47a91e5e7bc8320fa98
child 391206 b4a5450f62bca390a5fdda70e423f021d2a2eb2d
push id55135
push userjacheng@mozilla.com
push dateFri, 10 Nov 2017 11:03:58 +0000
treeherderautoland@270709ba8f67 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskikuo
bugs1416141
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1416141 - Remove Telemetry VIDEO_EME_PLAY_SUCCESS. r=kikuo MozReview-Commit-ID: BtiD2tUmbE9
dom/html/HTMLMediaElement.cpp
dom/html/HTMLMediaElement.h
toolkit/components/telemetry/Histograms.json
toolkit/components/telemetry/histogram-whitelists.json
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -1732,22 +1732,16 @@ void HTMLMediaElement::ShutdownDecoder()
     mMediaSource->CompletePendingTransactions();
   }
   mDecoder->Shutdown();
   mDecoder = nullptr;
 }
 
 void HTMLMediaElement::AbortExistingLoads()
 {
-  // If there is no existing decoder then we don't have anything to
-  // report. This prevents reporting the initial load from an
-  // empty video element as a failed EME load.
-  if (mDecoder) {
-    ReportEMETelemetry();
-  }
   // Abort any already-running instance of the resource selection algorithm.
   mLoadWaitStatus = NOT_WAITING;
 
   // Set a new load ID. This will cause events which were enqueued
   // with a different load ID to silently be cancelled.
   mCurrentLoadID++;
 
   // Immediately reject or resolve the already-dispatched
@@ -4586,28 +4580,16 @@ void HTMLMediaElement::HiddenVideoStop()
   if (!mVideoDecodeSuspendTimer) {
     return;
   }
   mVideoDecodeSuspendTimer->Cancel();
   mVideoDecodeSuspendTimer = nullptr;
 }
 
 void
-HTMLMediaElement::ReportEMETelemetry()
-{
-  // Report telemetry for EME videos when a page is unloaded.
-  NS_ASSERTION(NS_IsMainThread(), "Should be on main thread.");
-  if (mIsEncrypted && Preferences::GetBool("media.eme.enabled")) {
-    Telemetry::Accumulate(Telemetry::VIDEO_EME_PLAY_SUCCESS, mLoadedDataFired);
-    LOG(LogLevel::Debug, ("%p VIDEO_EME_PLAY_SUCCESS = %s",
-                       this, mLoadedDataFired ? "true" : "false"));
-  }
-}
-
-void
 HTMLMediaElement::ReportTelemetry()
 {
   // Report telemetry for videos when a page is unloaded. We
   // want to know data on what state the video is at when
   // the user has exited.
   enum UnloadedState {
     ENDED = 0,
     PAUSED = 1,
@@ -6458,17 +6440,16 @@ void HTMLMediaElement::SuspendOrResumeEl
       this, aPauseElement, aSuspendEvents, OwnerDoc()->Hidden()));
 
   if (aPauseElement != mPausedForInactiveDocumentOrChannel) {
     mPausedForInactiveDocumentOrChannel = aPauseElement;
     UpdateSrcMediaStreamPlaying();
     UpdateAudioChannelPlayingState();
     if (aPauseElement) {
       ReportTelemetry();
-      ReportEMETelemetry();
 
       // For EME content, we may force destruction of the CDM client (and CDM
       // instance if this is the last client for that CDM instance) and
       // the CDM's decoder. This ensures the CDM gets reliable and prompt
       // shutdown notifications, as it may have book-keeping it needs
       // to do on shutdown.
       if (mMediaKeys) {
         nsAutoString keySystem;
--- a/dom/html/HTMLMediaElement.h
+++ b/dom/html/HTMLMediaElement.h
@@ -1236,18 +1236,16 @@ protected:
    */
   void HiddenVideoStart();
   /**
    * Video is not playing anymore and/or has become visible.
    * Used to track hidden-video telemetry.
    */
   void HiddenVideoStop();
 
-  void ReportEMETelemetry();
-
   void ReportTelemetry();
 
   // Seeks to aTime seconds. aSeekType can be Exact to seek to exactly the
   // seek target, or PrevSyncPoint if a quicker but less precise seek is
   // desired, and we'll seek to the sync point (keyframe and/or start of the
   // next block of audio samples) preceeding seek target.
   already_AddRefed<Promise> Seek(double aTime, SeekTarget::Type aSeekType, ErrorResult& aRv);
 
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -11498,22 +11498,16 @@
   "DATA_STORAGE_ENTRIES": {
     "record_in_processes": ["main", "content"],
     "expires_in_version": "default",
     "kind": "linear",
     "high": 1024,
     "n_buckets": 16,
     "description": "The number of entries in persistent DataStorage (HSTS and HPKP data, basically)"
   },
-  "VIDEO_EME_PLAY_SUCCESS": {
-    "record_in_processes": ["main", "content"],
-    "expires_in_version": "45",
-    "kind": "boolean",
-    "description": "EME video playback success or failure"
-  },
   "VIDEO_PLAY_TIME_MS" : {
     "record_in_processes": ["main", "content"],
     "alert_emails": ["ajones@mozilla.com"],
     "expires_in_version": "60",
     "description": "Total time spent playing video in milliseconds. This reports the total play time for an HTML Media Element whenever it is suspended or resumed, such as when the page is unloaded, or when the mute status changes when the AudioChannelAPI pref is set.",
     "kind": "exponential",
     "high": 7200000,
     "n_buckets": 100,
--- a/toolkit/components/telemetry/histogram-whitelists.json
+++ b/toolkit/components/telemetry/histogram-whitelists.json
@@ -548,17 +548,16 @@
     "TRANSLATION_OPPORTUNITIES",
     "TRANSLATION_OPPORTUNITIES_BY_LANGUAGE",
     "VIDEO_CANPLAYTYPE_H264_CONSTRAINT_SET_FLAG",
     "VIDEO_CANPLAYTYPE_H264_LEVEL",
     "VIDEO_CANPLAYTYPE_H264_PROFILE",
     "VIDEO_DECODED_H264_SPS_CONSTRAINT_SET_FLAG",
     "VIDEO_DECODED_H264_SPS_LEVEL",
     "VIDEO_DECODED_H264_SPS_PROFILE",
-    "VIDEO_EME_PLAY_SUCCESS",
     "VIDEO_H264_SPS_MAX_NUM_REF_FRAMES",
     "WEAVE_COMPLETE_SUCCESS_COUNT",
     "WEAVE_CONFIGURED",
     "WEAVE_CONFIGURED_MASTER_PASSWORD",
     "WEAVE_START_COUNT",
     "WEBCRYPTO_ALG",
     "WEBCRYPTO_EXTRACTABLE_ENC",
     "WEBCRYPTO_EXTRACTABLE_GENERATE",
@@ -1406,17 +1405,16 @@
     "VIDEO_CANPLAYTYPE_H264_CONSTRAINT_SET_FLAG",
     "VIDEO_CANPLAYTYPE_H264_LEVEL",
     "VIDEO_CANPLAYTYPE_H264_PROFILE",
     "VIDEO_CAN_CREATE_AAC_DECODER",
     "VIDEO_CAN_CREATE_H264_DECODER",
     "VIDEO_DECODED_H264_SPS_CONSTRAINT_SET_FLAG",
     "VIDEO_DECODED_H264_SPS_LEVEL",
     "VIDEO_DECODED_H264_SPS_PROFILE",
-    "VIDEO_EME_PLAY_SUCCESS",
     "VIDEO_EME_REQUEST_FAILURE_LATENCY_MS",
     "VIDEO_EME_REQUEST_SUCCESS_LATENCY_MS",
     "VIDEO_H264_SPS_MAX_NUM_REF_FRAMES",
     "VIEW_SOURCE_EXTERNAL_RESULT_BOOLEAN",
     "VIEW_SOURCE_IN_BROWSER_OPENED_BOOLEAN",
     "VIEW_SOURCE_IN_WINDOW_OPENED_BOOLEAN",
     "WEAVE_COMPLETE_SUCCESS_COUNT",
     "WEAVE_CONFIGURED",