Bug 1525374 - Update expired Telemetry for tab audio indicator. r=jaws,janerik
authorAlastor Wu <alwu@mozilla.com>
Thu, 07 Feb 2019 18:01:13 +0000
changeset 457636 259ae52cb2aed0f17d5799b0f8170b7b13cb2aae
parent 457635 3ed3848d7631f17ae9e662fcf574cb87459ab34f
child 457637 466f9c24e749d7b3701b60c5ed424e586634a718
push id35516
push userrmaries@mozilla.com
push dateFri, 08 Feb 2019 04:23:26 +0000
treeherdermozilla-central@d599d1a73a3a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, janerik
bugs1525374
milestone67.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 1525374 - Update expired Telemetry for tab audio indicator. r=jaws,janerik * TAB_AUDIO_INDICATOR_USED Keep this ping in order to know the usage of different icons, especially the play icon is part of blocking autoplay feature which would probably be landed in fx66. And we would like to know how many user would use that icon to resume blocked media. * TAB_MEDIA_BLOCKING_TIME_MS This telemetry is used to record the delaying time, and we could remove it because now we don't need this data for our analysis. Differential Revision: https://phabricator.services.mozilla.com/D18741
browser/base/content/tabbrowser.js
browser/base/content/tabbrowser.xml
toolkit/components/telemetry/Histograms.json
--- a/browser/base/content/tabbrowser.js
+++ b/browser/base/content/tabbrowser.js
@@ -4769,32 +4769,30 @@ window._gBrowser = {
       var tab = this.getTabFromAudioEvent(event);
       if (!tab) {
         return;
       }
 
       if (!tab.hasAttribute("activemedia-blocked")) {
         tab.setAttribute("activemedia-blocked", true);
         this._tabAttrModified(tab, ["activemedia-blocked"]);
-        tab.startMediaBlockTimer();
       }
     });
 
     this.addEventListener("DOMAudioPlaybackBlockStopped", (event) => {
       var tab = this.getTabFromAudioEvent(event);
       if (!tab) {
         return;
       }
 
       if (tab.hasAttribute("activemedia-blocked")) {
         tab.removeAttribute("activemedia-blocked");
         this._tabAttrModified(tab, ["activemedia-blocked"]);
         let hist = Services.telemetry.getHistogramById("TAB_AUDIO_INDICATOR_USED");
         hist.add(2 /* unblockByVisitingTab */ );
-        tab.finishMediaBlockTimer();
       }
     });
 
     this.addEventListener("GloballyAutoplayBlocked", (event) => {
       let browser = event.originalTarget;
       let tab = this.getTabForBrowser(browser);
       if (!tab) {
         return;
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -2250,43 +2250,30 @@
         <body><![CDATA[
           // Stop timer when the tab is opened.
           if (TelemetryStopwatch.running("HOVER_UNTIL_UNSELECTED_TAB_OPENED", this)) {
             TelemetryStopwatch.finish("HOVER_UNTIL_UNSELECTED_TAB_OPENED", this);
           }
         ]]></body>
       </method>
 
-      <method name="startMediaBlockTimer">
-        <body><![CDATA[
-          TelemetryStopwatch.start("TAB_MEDIA_BLOCKING_TIME_MS", this);
-        ]]></body>
-      </method>
-
-       <method name="finishMediaBlockTimer">
-        <body><![CDATA[
-          TelemetryStopwatch.finish("TAB_MEDIA_BLOCKING_TIME_MS", this);
-        ]]></body>
-      </method>
-
       <method name="toggleMuteAudio">
         <parameter name="aMuteReason"/>
         <body>
         <![CDATA[
           let browser = this.linkedBrowser;
           let modifiedAttrs = [];
           let hist = Services.telemetry.getHistogramById("TAB_AUDIO_INDICATOR_USED");
 
           if (this.hasAttribute("activemedia-blocked")) {
             this.removeAttribute("activemedia-blocked");
             modifiedAttrs.push("activemedia-blocked");
 
             browser.resumeMedia();
             hist.add(3 /* unblockByClickingIcon */);
-            this.finishMediaBlockTimer();
           } else {
             if (browser.audioMuted) {
               if (this.linkedPanel) {
                 // "Lazy Browser" should not invoke its unmute method
                 browser.unmute();
               }
               this.removeAttribute("muted");
               hist.add(1 /* unmute */);
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -13334,36 +13334,24 @@
     "kind": "exponential",
     "high": 100000,
     "n_buckets": 100,
     "bug_numbers": [1411632],
     "description": "The time between navigation start and the first non-blank paint of a foreground root content document, in milliseconds. This only records documents that were in an active docshell throughout the whole time between navigation start and non-blank paint. The non-blank paint timestamp is taken during display list building and does not include rasterization or compositing of that paint.  This probe only accumulates when there were no active-tab network load optimizations happening during the interval."
   },
   "TAB_AUDIO_INDICATOR_USED": {
     "record_in_processes": ["main", "content"],
-    "alert_emails": ["alwu@mozilla.com"],
-    "expires_in_version": "58",
+    "alert_emails": ["alwu@mozilla.com", "nohlmeier@mozilla.com"],
+    "expires_in_version": "72",
     "kind": "enumerated",
     "n_values": 6,
-    "bug_numbers": [1314220],
+    "bug_numbers": [1314220, 1525374],
     "description": "The total usage amount of the operations of tab audio indicator, mute=0 , unmuted=1, unblockByVisitingTab=2, unblockingByClickingIcon=3",
     "releaseChannelCollection": "opt-out"
   },
-  "TAB_MEDIA_BLOCKING_TIME_MS": {
-    "record_in_processes": ["main", "content"],
-    "alert_emails": ["alwu@mozilla.com"],
-    "expires_in_version": "58",
-    "kind": "linear",
-    "low": 1000,
-    "high": 90000,
-    "n_buckets": 91,
-    "bug_numbers": [1314220],
-    "description": "The time duration from tab's media was blocked to unblocked. Now we record from 1 to 90 seconds, but the record by milliseconds, so the bucket is like [1000ms, 2000ms], [2000ms, 3000ms], e.t.c.",
-    "releaseChannelCollection": "opt-out"
-  },
   "MOZ_CHUNKED_ARRAYBUFFER_IN_XHR": {
     "record_in_processes": ["main", "content"],
     "alert_emails": ["amarchesini@mozilla.com"],
     "expires_in_version": "58",
     "kind": "boolean",
     "bug_numbers": [1335365],
     "releaseChannelCollection": "opt-out",
     "description": "XMLHttpRequest.responseType set to moz-chunked-arraybuffer"