Bug 1281536 - remove reader mode telemetry that's out of date, extend two existing probes, r?margaret,rweiss draft
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Fri, 24 Jun 2016 15:39:23 +0100
changeset 381194 7b73decd9ea17a12827ba239458ac1ffd10ba14b
parent 380786 dbe8807bcf0db60680a940eaaaf01f4488c6bf22
child 523907 c659f15e85c30222bb02313035b5af978885d9a0
push id21419
push usergijskruitbosch@gmail.com
push dateFri, 24 Jun 2016 16:58:03 +0000
reviewersmargaret, rweiss
bugs1281536
milestone50.0a1
Bug 1281536 - remove reader mode telemetry that's out of date, extend two existing probes, r?margaret,rweiss MozReview-Commit-ID: 2FSr4v4fPWU
toolkit/components/reader/ReaderMode.jsm
toolkit/components/telemetry/Histograms.json
--- a/toolkit/components/reader/ReaderMode.jsm
+++ b/toolkit/components/reader/ReaderMode.jsm
@@ -209,22 +209,17 @@ this.ReaderMode = {
    * Downloads and parses a document from a URL.
    *
    * @param url URL to download and parse.
    * @return {Promise}
    * @resolves JS object representing the article, or null if no article is found.
    */
   downloadAndParseDocument: Task.async(function* (url) {
     let uri = Services.io.newURI(url, null, null);
-    TelemetryStopwatch.start("READER_MODE_DOWNLOAD_MS");
-    let doc = yield this._downloadDocument(url).catch(e => {
-      TelemetryStopwatch.finish("READER_MODE_DOWNLOAD_MS");
-      throw e;
-    });
-    TelemetryStopwatch.finish("READER_MODE_DOWNLOAD_MS");
+    let doc = yield this._downloadDocument(url);
     return yield this._readerParse(uri, doc);
   }),
 
   _downloadDocument: function (url) {
     let histogram = Services.telemetry.getHistogramById("READER_MODE_DOWNLOAD_RESULT");
     return new Promise((resolve, reject) => {
       let xhr = new XMLHttpRequest();
       xhr.open("GET", url, true);
@@ -421,31 +416,27 @@ this.ReaderMode = {
     let uriParam = {
       spec: uri.spec,
       host: uri.host,
       prePath: uri.prePath,
       scheme: uri.scheme,
       pathBase: Services.io.newURI(".", null, uri).spec
     };
 
-    TelemetryStopwatch.start("READER_MODE_SERIALIZE_DOM_MS");
     let serializer = Cc["@mozilla.org/xmlextras/xmlserializer;1"].
                      createInstance(Ci.nsIDOMSerializer);
     let serializedDoc = serializer.serializeToString(doc);
-    TelemetryStopwatch.finish("READER_MODE_SERIALIZE_DOM_MS");
 
-    TelemetryStopwatch.start("READER_MODE_WORKER_PARSE_MS");
     let article = null;
     try {
       article = yield ReaderWorker.post("parseDocument", [uriParam, serializedDoc]);
     } catch (e) {
       Cu.reportError("Error in ReaderWorker: " + e);
       histogram.add(PARSE_ERROR_WORKER);
     }
-    TelemetryStopwatch.finish("READER_MODE_WORKER_PARSE_MS");
 
     if (!article) {
       this.log("Worker did not return an article");
       histogram.add(PARSE_ERROR_NO_ARTICLE);
       return null;
     }
 
     // Readability returns a URI object, but we only care about the URL.
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -9586,50 +9586,25 @@
   "GRAPHICS_SANITY_TEST": {
     "expires_in_version": "never",
     "alert_emails": ["gfx-telemetry-alerts@mozilla.com","msreckovic@mozilla.com"],
     "kind": "enumerated",
     "n_values": 20,
     "releaseChannelCollection": "opt-out",
     "description": "Reports results from the graphics sanity test to track which drivers are having problems (0=TEST_PASSED, 1=TEST_FAILED_RENDER, 2=TEST_FAILED_VIDEO, 3=TEST_CRASHED)"
   },
-  "READER_MODE_SERIALIZE_DOM_MS": {
-    "expires_in_version": "50",
-    "alert_emails": ["mleibovic@mozilla.com"],
-    "kind": "exponential",
-    "high": 5000,
-    "n_buckets": 15,
-    "description": "Time (ms) to serialize a DOM to send to the reader worker"
-  },
-  "READER_MODE_WORKER_PARSE_MS": {
-    "expires_in_version": "50",
-    "alert_emails": ["mleibovic@mozilla.com"],
-    "kind": "exponential",
-    "high": 10000,
-    "n_buckets": 30,
-    "description": "Time (ms) for the reader worker to parse a document"
-  },
-  "READER_MODE_DOWNLOAD_MS": {
-    "expires_in_version": "50",
-    "alert_emails": ["mleibovic@mozilla.com"],
-    "kind": "exponential",
-    "low": 50,
-    "high": 40000,
-    "n_buckets": 60,
-    "description": "Time (ms) to download a document to show in reader mode"
-  },
   "READER_MODE_PARSE_RESULT" : {
-    "expires_in_version": "50",
+    "expires_in_version": "54",
     "alert_emails": ["mleibovic@mozilla.com"],
     "kind": "enumerated",
     "n_values": 5,
     "description": "The result of trying to parse a document to show in reader view (0=Success, 1=Error too many elements, 2=Error in worker, 3=Error no article)"
   },
   "READER_MODE_DOWNLOAD_RESULT" : {
-    "expires_in_version": "50",
+    "expires_in_version": "54",
     "alert_emails": ["mleibovic@mozilla.com"],
     "kind": "enumerated",
     "n_values": 5,
     "description": "The result of trying to download a document to show in reader view (0=Success, 1=Error XHR, 2=Error no document)"
   },
   "FENNEC_LOAD_SAVED_PAGE": {
     "expires_in_version": "50",
     "alert_emails": ["mobile-frontend@mozilla.com"],