Bug 1281536 - remove reader mode telemetry that's out of date, extend two existing probes, r?margaret,rweiss
MozReview-Commit-ID: 2FSr4v4fPWU
--- 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"],