From d795f46f4020cd523895ffceb20b46d7b71ee6e3 Mon Sep 17 00:00:00 2001 From: Marco Bonardo Date: Mon, 30 Jan 2012 12:49:27 +0100 Subject: [PATCH] Backout 3bd7584753ae for test failures --- toolkit/components/telemetry/TelemetryPing.js | 27 ++++--------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/toolkit/components/telemetry/TelemetryPing.js b/toolkit/components/telemetry/TelemetryPing.js index e1361fe9fd83..7a6c2a85f905 100644 --- a/toolkit/components/telemetry/TelemetryPing.js +++ b/toolkit/components/telemetry/TelemetryPing.js @@ -184,9 +184,6 @@ TelemetryPing.prototype = { // duplicate submissions. _uuid: generateUUID(), _prevSession: null, - // Regex that matches histograms we care about during startup. - _startupHistogramRegex: /SQLITE|HTTP|SPDY|CACHE|DNS/, - _slowSQLStartup: {}, /** * Returns a set of histograms that can be converted into JSON @@ -385,27 +382,17 @@ TelemetryPing.prototype = { this.addValue(mr.path, id, val); } }, - - /** - * Return true if we're interested in having a STARTUP_* histogram for - * the given histogram name. - */ - isInterestingStartupHistogram: function isInterestingStartupHistogram(name) { - return this._startupHistogramRegex.test(name); - }, /** - * Make a copy of interesting histograms at startup. + * Make a copy of sqlite histograms on startup */ - gatherStartupInformation: function gatherStartupInformation() { + gatherStartupSqlite: function gatherStartupSqlite() { let info = Telemetry.registeredHistograms; - let snapshots = Telemetry.histogramSnapshots; + let sqlite_re = /SQLITE/; for (let name in info) { - // Only duplicate interesting histograms with actual data. - if (this.isInterestingStartupHistogram(name) && name in snapshots) + if (sqlite_re.test(name)) Telemetry.histogramFrom("STARTUP_" + name, name); } - this._slowSQLStartup = Telemetry.slowSQL; }, /** @@ -449,10 +436,6 @@ TelemetryPing.prototype = { payloadObj.simpleMeasurements = getSimpleMeasurements(); payloadObj.histograms = this.getHistograms(Telemetry.histogramSnapshots); payloadObj.slowSQL = Telemetry.slowSQL; - if (Object.keys(this._slowSQLStartup.mainThread).length - || Object.keys(this._slowSQLStartup.otherThreads).length) { - payloadObj.slowSQLStartup = this._slowSQLStartup; - } } return { previous: !!havePreviousSession, slug: slug, payload: JSON.stringify(payloadObj) }; }, @@ -619,7 +602,7 @@ TelemetryPing.prototype = { } break; case "sessionstore-windows-restored": - this.gatherStartupInformation(); + this.gatherStartupSqlite(); break; case "idle-daily": // Enqueue to main-thread, otherwise components may be inited by the