Bug 1261955 - Remove VIDEO_MSE_JOIN_LATENCY_MS telemetry probe. r=SingingTree draft
authorRalph Giles <giles@mozilla.com>
Thu, 21 Apr 2016 14:13:38 -0700
changeset 363871 1fdd8d50a38bb5928d37311cc1c16c7ebee9605e
parent 363870 e5a10bc7dac4ee2453d8319165c1f6578203eac7
child 363872 4f9582bfbba41d37000009e4e7c1e02b51c3d9dc
push id17329
push userbmo:giles@thaumas.net
push dateThu, 05 May 2016 19:43:28 +0000
reviewersSingingTree
bugs1261955
milestone49.0a1
Bug 1261955 - Remove VIDEO_MSE_JOIN_LATENCY_MS telemetry probe. r=SingingTree This is no longer necessary. MozReview-Commit-ID: 81pF9cSvKab
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
@@ -1292,19 +1292,16 @@ nsresult HTMLMediaElement::LoadResource(
       // TODO: Handle failure: run "If the media data cannot be fetched at
       // all, due to network errors, causing the user agent to give up
       // trying to fetch the resource" section of resource fetch algorithm.
       decoder->Shutdown();
       return NS_ERROR_FAILURE;
     }
     RefPtr<MediaResource> resource =
       MediaSourceDecoder::CreateResource(mMediaSource->GetPrincipal());
-    if (IsAutoplayEnabled()) {
-      mJoinLatency.Start();
-    }
     return FinishDecoderSetup(decoder, resource, nullptr);
   }
 
   // determine what security checks need to be performed in AsyncOpen2().
   nsSecurityFlags securityFlags =
     ShouldCheckAllowOrigin() ? nsILoadInfo::SEC_REQUIRE_CORS_DATA_INHERITS :
                                nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS;
 
@@ -2852,21 +2849,16 @@ HTMLMediaElement::ReportMSETelemetry()
     }
   }
 
   Telemetry::Accumulate(Telemetry::VIDEO_MSE_UNLOAD_STATE, state);
   LOG(LogLevel::Debug, ("%p VIDEO_MSE_UNLOAD_STATE = %d", this, state));
 
   Telemetry::Accumulate(Telemetry::VIDEO_MSE_PLAY_TIME_MS, SECONDS_TO_MS(mPlayTime.Total()));
   LOG(LogLevel::Debug, ("%p VIDEO_MSE_PLAY_TIME_MS = %f", this, mPlayTime.Total()));
-
-  double latency = mJoinLatency.Count() ? mJoinLatency.Total() / mJoinLatency.Count() : 0.0;
-  Telemetry::Accumulate(Telemetry::VIDEO_MSE_JOIN_LATENCY_MS, SECONDS_TO_MS(latency));
-  LOG(LogLevel::Debug, ("%p VIDEO_MSE_JOIN_LATENCY = %f (%d ms) count=%d\n",
-                     this, latency, SECONDS_TO_MS(latency), mJoinLatency.Count()));
 }
 
 void HTMLMediaElement::UnbindFromTree(bool aDeep,
                                       bool aNullParent)
 {
   if (!mPaused && mNetworkState != nsIDOMHTMLMediaElement::NETWORK_EMPTY) {
     Pause();
   }
@@ -4330,17 +4322,16 @@ nsresult HTMLMediaElement::DispatchAsync
 
   // Only collect rebuffer and stall rate stats for MSE video.
   if (!mMediaSource) {
     return NS_OK;
   }
 
   if ((aName.EqualsLiteral("play") || aName.EqualsLiteral("playing"))) {
     mPlayTime.Start();
-    mJoinLatency.Pause();
   } else if (aName.EqualsLiteral("waiting")) {
     mPlayTime.Pause();
     Telemetry::Accumulate(Telemetry::VIDEO_MSE_BUFFERING_COUNT, 1);
   } else if (aName.EqualsLiteral("pause")) {
     mPlayTime.Pause();
   }
 
   return NS_OK;
--- a/dom/html/HTMLMediaElement.h
+++ b/dom/html/HTMLMediaElement.h
@@ -1596,19 +1596,16 @@ public:
     TimeStamp mStartTime;
     TimeDuration mSum;
     uint32_t mCount;
   };
 private:
   // Total time an MSE video has spent playing
   TimeDurationAccumulator mPlayTime;
 
-  // Time spent between video load and video playback.
-  TimeDurationAccumulator mJoinLatency;
-
   // Indicates if user has interacted with the element.
   // Used to block autoplay when disabled.
   bool mHasUserInteraction;
 
   // True if the first frame has been successfully loaded.
   bool mFirstFrameLoaded;
 
   // Media elements also have a default playback start position, which must
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -8943,23 +8943,16 @@
     "n_buckets": 16,
     "description": "The number of entries in persistent DataStorage (HSTS and HPKP data, basically)"
   },
   "VIDEO_EME_PLAY_SUCCESS": {
     "expires_in_version": "45",
     "kind": "boolean",
     "description": "EME video playback success or failure"
   },
-  "VIDEO_MSE_JOIN_LATENCY_MS" : {
-    "expires_in_version": "45",
-    "description": "Time in MS between MSE video load and playback",
-    "kind": "exponential",
-    "high": 30000,
-    "n_buckets": 50
-  },
   "VIDEO_MSE_PLAY_TIME_MS" : {
     "expires_in_version": "45",
     "description": "Total time spent playing MSE video",
     "kind": "exponential",
     "high": 7200000,
     "n_buckets": 100
   },
   "VIDEO_MSE_BUFFERING_COUNT" : {
--- a/toolkit/components/telemetry/histogram-whitelists.json
+++ b/toolkit/components/telemetry/histogram-whitelists.json
@@ -1014,17 +1014,16 @@
     "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",
     "VIDEO_MSE_BUFFERING_COUNT",
-    "VIDEO_MSE_JOIN_LATENCY_MS",
     "VIDEO_MSE_PLAY_TIME_MS",
     "VIDEO_MSE_UNLOAD_STATE",
     "WEAVE_COMPLETE_SUCCESS_COUNT",
     "WEAVE_CONFIGURED",
     "WEAVE_CONFIGURED_MASTER_PASSWORD",
     "WEAVE_START_COUNT",
     "WEBCRYPTO_ALG",
     "WEBCRYPTO_EXTRACTABLE_ENC",
@@ -2382,17 +2381,16 @@
     "VIDEO_EME_ADOBE_HIDDEN_REASON",
     "VIDEO_EME_ADOBE_INSTALL_FAILED_REASON",
     "VIDEO_EME_ADOBE_UNSUPPORTED_REASON",
     "VIDEO_EME_PLAY_SUCCESS",
     "VIDEO_EME_REQUEST_FAILURE_LATENCY_MS",
     "VIDEO_EME_REQUEST_SUCCESS_LATENCY_MS",
     "VIDEO_H264_SPS_MAX_NUM_REF_FRAMES",
     "VIDEO_MSE_BUFFERING_COUNT",
-    "VIDEO_MSE_JOIN_LATENCY_MS",
     "VIDEO_MSE_PLAY_TIME_MS",
     "VIDEO_MSE_UNLOAD_STATE",
     "VIDEO_OPENH264_GMP_DISAPPEARED",
     "VIDEO_OPENH264_GMP_MISSING_FILES",
     "VIEW_SOURCE_EXTERNAL_RESULT_BOOLEAN",
     "VIEW_SOURCE_IN_BROWSER_OPENED_BOOLEAN",
     "VIEW_SOURCE_IN_WINDOW_OPENED_BOOLEAN",
     "WEAVE_COMPLETE_SUCCESS_COUNT",