--- a/devtools/client/framework/devtools-browser.js
+++ b/devtools/client/framework/devtools-browser.js
@@ -10,17 +10,16 @@
*
* This module is loaded lazily by devtools-clhandler.js, once the first
* browser window is ready (i.e. fired browser-delayed-startup-finished event)
**/
const {Cc, Ci, Cu} = require("chrome");
const Services = require("Services");
const defer = require("devtools/shared/defer");
-const Telemetry = require("devtools/client/shared/telemetry");
const {gDevTools} = require("./devtools");
// Load target and toolbox lazily as they need gDevTools to be fully initialized
loader.lazyRequireGetter(this, "TargetFactory", "devtools/client/framework/target", true);
loader.lazyRequireGetter(this, "Toolbox", "devtools/client/framework/toolbox", true);
loader.lazyRequireGetter(this, "DebuggerServer", "devtools/server/main", true);
loader.lazyRequireGetter(this, "DebuggerClient", "devtools/shared/client/main", true);
loader.lazyRequireGetter(this, "BrowserMenus", "devtools/client/framework/browser-menus");
@@ -29,21 +28,16 @@ loader.lazyRequireGetter(this, "appendSt
loader.lazyImporter(this, "CustomizableUI", "resource:///modules/CustomizableUI.jsm");
loader.lazyImporter(this, "CustomizableWidgets", "resource:///modules/CustomizableWidgets.jsm");
loader.lazyImporter(this, "AppConstants", "resource://gre/modules/AppConstants.jsm");
loader.lazyImporter(this, "LightweightThemeManager", "resource://gre/modules/LightweightThemeManager.jsm");
const {LocalizationHelper} = require("devtools/shared/l10n");
const L10N = new LocalizationHelper("devtools/client/locales/toolbox.properties");
-const TABS_OPEN_PEAK_HISTOGRAM = "DEVTOOLS_TABS_OPEN_PEAK_LINEAR";
-const TABS_OPEN_AVG_HISTOGRAM = "DEVTOOLS_TABS_OPEN_AVERAGE_LINEAR";
-const TABS_PINNED_PEAK_HISTOGRAM = "DEVTOOLS_TABS_PINNED_PEAK_LINEAR";
-const TABS_PINNED_AVG_HISTOGRAM = "DEVTOOLS_TABS_PINNED_AVERAGE_LINEAR";
-
const COMPACT_LIGHT_ID = "firefox-compact-light@mozilla.org";
const COMPACT_DARK_ID = "firefox-compact-dark@mozilla.org";
const BROWSER_STYLESHEET_URL = "chrome://devtools/skin/devtools-browser.css";
/**
* gDevToolsBrowser exposes functions to connect the gDevTools instance with a
* Firefox instance.
@@ -56,18 +50,16 @@ var gDevToolsBrowser = exports.gDevTools
_trackedBrowserWindows: new Set(),
/**
* WeakMap keeping track of the devtools-browser stylesheets loaded in the various
* tracked windows.
*/
_browserStyleSheets: new WeakMap(),
- _telemetry: new Telemetry(),
-
_tabStats: {
peakOpen: 0,
peakPinned: 0,
histOpen: [],
histPinned: []
},
/**
@@ -777,52 +769,32 @@ var gDevToolsBrowser = exports.gDevTools
break;
case "unload":
// top-level browser window unload
gDevToolsBrowser._forgetBrowserWindow(event.target.defaultView);
break;
}
},
- _pingTelemetry() {
- let mean = function (arr) {
- if (arr.length === 0) {
- return 0;
- }
-
- let total = arr.reduce((a, b) => a + b);
- return Math.ceil(total / arr.length);
- };
-
- let tabStats = gDevToolsBrowser._tabStats;
- this._telemetry.log(TABS_OPEN_PEAK_HISTOGRAM, tabStats.peakOpen);
- this._telemetry.log(TABS_OPEN_AVG_HISTOGRAM, mean(tabStats.histOpen));
- this._telemetry.log(TABS_PINNED_PEAK_HISTOGRAM, tabStats.peakPinned);
- this._telemetry.log(TABS_PINNED_AVG_HISTOGRAM, mean(tabStats.histPinned));
- },
-
/**
* Either the SDK Loader has been destroyed by the add-on contribution
* workflow, or firefox is shutting down.
* @param {boolean} shuttingDown
* True if firefox is currently shutting down. We may prevent doing
* some cleanups to speed it up. Otherwise everything need to be
* cleaned up in order to be able to load devtools again.
*/
destroy({ shuttingDown }) {
Services.prefs.removeObserver("devtools.", gDevToolsBrowser);
Services.obs.removeObserver(gDevToolsBrowser, "lightweight-theme-changed");
Services.obs.removeObserver(gDevToolsBrowser, "browser-delayed-startup-finished");
Services.obs.removeObserver(gDevToolsBrowser, "quit-application");
Services.obs.removeObserver(gDevToolsBrowser, "sdk:loader:destroy");
- gDevToolsBrowser._pingTelemetry();
- gDevToolsBrowser._telemetry = null;
-
for (let win of gDevToolsBrowser._trackedBrowserWindows) {
gDevToolsBrowser._forgetBrowserWindow(win);
}
// Remove scripts loaded in content process to support the Browser Content Toolbox.
DebuggerServer.removeContentServerScript();
gDevTools.destroy({ shuttingDown });
--- a/devtools/client/framework/toolbox.js
+++ b/devtools/client/framework/toolbox.js
@@ -5,18 +5,16 @@
"use strict";
const SOURCE_MAP_WORKER = "resource://devtools/client/shared/source-map/worker.js";
const MAX_ORDINAL = 99;
const SPLITCONSOLE_ENABLED_PREF = "devtools.toolbox.splitconsoleEnabled";
const SPLITCONSOLE_HEIGHT_PREF = "devtools.toolbox.splitconsoleHeight";
const DISABLE_AUTOHIDE_PREF = "ui.popup.disable_autohide";
-const OS_HISTOGRAM = "DEVTOOLS_OS_ENUMERATED_PER_USER";
-const OS_IS_64_BITS = "DEVTOOLS_OS_IS_64_BITS_PER_USER";
const HOST_HISTOGRAM = "DEVTOOLS_TOOLBOX_HOST";
const SCREENSIZE_HISTOGRAM = "DEVTOOLS_SCREEN_RESOLUTION_ENUMERATED_PER_USER";
const HTML_NS = "http://www.w3.org/1999/xhtml";
var {Ci, Cu} = require("chrome");
var promise = require("promise");
var defer = require("devtools/shared/defer");
var Services = require("Services");
@@ -583,19 +581,16 @@ Toolbox.prototype = {
case Toolbox.HostType.CUSTOM: return 3;
default: return 9;
}
},
_pingTelemetry: function () {
this._telemetry.toolOpened("toolbox");
- this._telemetry.logOncePerBrowserVersion(OS_HISTOGRAM, system.getOSCPU());
- this._telemetry.logOncePerBrowserVersion(OS_IS_64_BITS,
- Services.appinfo.is64Bit ? 1 : 0);
this._telemetry.logOncePerBrowserVersion(SCREENSIZE_HISTOGRAM,
system.getScreenDimensions());
this._telemetry.log(HOST_HISTOGRAM, this._getTelemetryHostId());
},
/**
* Create a simple object to store the state of a toolbox button. The checked state of
* a button can be updated arbitrarily outside of the scope of the toolbar and its
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -9932,69 +9932,23 @@
},
"DEVTOOLS_WEBIDE_CONNECTED_RUNTIME_VERSION": {
"record_in_processes": ["main", "content"],
"expires_in_version": "never",
"kind": "boolean",
"keyed": true,
"description": "What runtime version did WebIDE connect to?"
},
- "DEVTOOLS_OS_ENUMERATED_PER_USER": {
- "record_in_processes": ["main", "content"],
- "expires_in_version": "never",
- "kind": "enumerated",
- "n_values": 13,
- "description": "OS of DevTools user (0:Windows XP, 1:Windows Vista, 2:Windows 7, 3:Windows 8, 4:Windows 8.1, 5:OSX, 6:Linux 7:Windows 10, 8:reserved, 9:reserved, 10:reserved, 11:reserved, 12:other)"
- },
- "DEVTOOLS_OS_IS_64_BITS_PER_USER": {
- "record_in_processes": ["main", "content"],
- "expires_in_version": "never",
- "kind": "enumerated",
- "n_values": 3,
- "description": "OS bit size of DevTools user (0:32bit, 1:64bit, 2:128bit)"
- },
"DEVTOOLS_SCREEN_RESOLUTION_ENUMERATED_PER_USER": {
"record_in_processes": ["main", "content"],
"expires_in_version": "never",
"kind": "enumerated",
"n_values": 13,
"description": "Screen resolution of DevTools user (0:lower, 1:800x600, 2:1024x768, 3:1280x800, 4:1280x1024, 5:1366x768, 6:1440x900, 7:1920x1080, 8:2560×1440, 9:2560×1600, 10:2880x1800, 11:other, 12:higher)"
},
- "DEVTOOLS_TABS_OPEN_PEAK_LINEAR": {
- "record_in_processes": ["main", "content"],
- "expires_in_version": "never",
- "kind": "linear",
- "high": 101,
- "n_buckets": 100,
- "description": "The peak number of open tabs in all windows for a session for devtools users."
- },
- "DEVTOOLS_TABS_OPEN_AVERAGE_LINEAR": {
- "record_in_processes": ["main", "content"],
- "expires_in_version": "never",
- "kind": "linear",
- "high": 101,
- "n_buckets": 100,
- "description": "The mean number of open tabs in all windows for a session for devtools users."
- },
- "DEVTOOLS_TABS_PINNED_PEAK_LINEAR": {
- "record_in_processes": ["main", "content"],
- "expires_in_version": "never",
- "kind": "linear",
- "high": 101,
- "n_buckets": 100,
- "description": "The peak number of pinned tabs (app tabs) in all windows for a session for devtools users."
- },
- "DEVTOOLS_TABS_PINNED_AVERAGE_LINEAR": {
- "record_in_processes": ["main", "content"],
- "expires_in_version": "never",
- "kind": "linear",
- "high": 101,
- "n_buckets": 100,
- "description": "The mean number of pinned tabs (app tabs) in all windows for a session for devtools users."
- },
"DEVTOOLS_SAVE_HEAP_SNAPSHOT_MS": {
"record_in_processes": ["main", "content"],
"expires_in_version": "never",
"kind": "exponential",
"high": 100000,
"n_buckets": 1000,
"description": "The time (in milliseconds) that it took to save a heap snapshot in mozilla::devtools::ChromeUtils::SaveHeapSnapshot."
},
--- a/toolkit/components/telemetry/histogram-whitelists.json
+++ b/toolkit/components/telemetry/histogram-whitelists.json
@@ -152,18 +152,16 @@
"DEVTOOLS_MEMORY_EXPORT_SNAPSHOT_COUNT",
"DEVTOOLS_MEMORY_FILTER_CENSUS",
"DEVTOOLS_MEMORY_IMPORT_SNAPSHOT_COUNT",
"DEVTOOLS_MEMORY_INVERTED_CENSUS",
"DEVTOOLS_MEMORY_TAKE_SNAPSHOT_COUNT",
"DEVTOOLS_MEMORY_TIME_ACTIVE_SECONDS",
"DEVTOOLS_NETMONITOR_TIME_ACTIVE_SECONDS",
"DEVTOOLS_OPTIONS_TIME_ACTIVE_SECONDS",
- "DEVTOOLS_OS_ENUMERATED_PER_USER",
- "DEVTOOLS_OS_IS_64_BITS_PER_USER",
"DEVTOOLS_PAINTFLASHING_TIME_ACTIVE_SECONDS",
"DEVTOOLS_PERFTOOLS_CONSOLE_RECORDING_COUNT",
"DEVTOOLS_PERFTOOLS_RECORDING_COUNT",
"DEVTOOLS_PERFTOOLS_RECORDING_DURATION_MS",
"DEVTOOLS_PERFTOOLS_RECORDING_EXPORT_FLAG",
"DEVTOOLS_PERFTOOLS_RECORDING_FEATURES_USED",
"DEVTOOLS_PERFTOOLS_RECORDING_IMPORT_FLAG",
"DEVTOOLS_PERFTOOLS_SELECTED_VIEW_MS",
@@ -171,20 +169,16 @@
"DEVTOOLS_RESPONSIVE_TIME_ACTIVE_SECONDS",
"DEVTOOLS_RULEVIEW_TIME_ACTIVE_SECONDS",
"DEVTOOLS_SAVE_HEAP_SNAPSHOT_MS",
"DEVTOOLS_SCRATCHPAD_TIME_ACTIVE_SECONDS",
"DEVTOOLS_SCREEN_RESOLUTION_ENUMERATED_PER_USER",
"DEVTOOLS_SHADEREDITOR_TIME_ACTIVE_SECONDS",
"DEVTOOLS_STORAGE_TIME_ACTIVE_SECONDS",
"DEVTOOLS_STYLEEDITOR_TIME_ACTIVE_SECONDS",
- "DEVTOOLS_TABS_OPEN_AVERAGE_LINEAR",
- "DEVTOOLS_TABS_OPEN_PEAK_LINEAR",
- "DEVTOOLS_TABS_PINNED_AVERAGE_LINEAR",
- "DEVTOOLS_TABS_PINNED_PEAK_LINEAR",
"DEVTOOLS_TILT_TIME_ACTIVE_SECONDS",
"DEVTOOLS_TOOLBOX_TIME_ACTIVE_SECONDS",
"DEVTOOLS_WEBAUDIOEDITOR_TIME_ACTIVE_SECONDS",
"DEVTOOLS_WEBCONSOLE_TIME_ACTIVE_SECONDS",
"DEVTOOLS_WEBIDE_CONNECTED_RUNTIME_APP_TYPE",
"DEVTOOLS_WEBIDE_CONNECTED_RUNTIME_ID",
"DEVTOOLS_WEBIDE_CONNECTED_RUNTIME_OS",
"DEVTOOLS_WEBIDE_CONNECTED_RUNTIME_PLATFORM_VERSION",
@@ -814,38 +808,32 @@
"DEVTOOLS_HEAP_SNAPSHOT_NODE_COUNT",
"DEVTOOLS_INSPECTOR_TIME_ACTIVE_SECONDS",
"DEVTOOLS_JSBROWSERDEBUGGER_TIME_ACTIVE_SECONDS",
"DEVTOOLS_JSDEBUGGER_TIME_ACTIVE_SECONDS",
"DEVTOOLS_JSPROFILER_TIME_ACTIVE_SECONDS",
"DEVTOOLS_MEMORY_TIME_ACTIVE_SECONDS",
"DEVTOOLS_NETMONITOR_TIME_ACTIVE_SECONDS",
"DEVTOOLS_OPTIONS_TIME_ACTIVE_SECONDS",
- "DEVTOOLS_OS_ENUMERATED_PER_USER",
- "DEVTOOLS_OS_IS_64_BITS_PER_USER",
"DEVTOOLS_PAINTFLASHING_TIME_ACTIVE_SECONDS",
"DEVTOOLS_PERFTOOLS_CONSOLE_RECORDING_COUNT",
"DEVTOOLS_PERFTOOLS_RECORDING_COUNT",
"DEVTOOLS_PERFTOOLS_RECORDING_DURATION_MS",
"DEVTOOLS_PERFTOOLS_RECORDING_EXPORT_FLAG",
"DEVTOOLS_PERFTOOLS_RECORDING_FEATURES_USED",
"DEVTOOLS_PERFTOOLS_RECORDING_IMPORT_FLAG",
"DEVTOOLS_PERFTOOLS_SELECTED_VIEW_MS",
"DEVTOOLS_READ_HEAP_SNAPSHOT_MS",
"DEVTOOLS_RULEVIEW_TIME_ACTIVE_SECONDS",
"DEVTOOLS_SAVE_HEAP_SNAPSHOT_MS",
"DEVTOOLS_SCRATCHPAD_TIME_ACTIVE_SECONDS",
"DEVTOOLS_SCREEN_RESOLUTION_ENUMERATED_PER_USER",
"DEVTOOLS_SHADEREDITOR_TIME_ACTIVE_SECONDS",
"DEVTOOLS_STORAGE_TIME_ACTIVE_SECONDS",
"DEVTOOLS_STYLEEDITOR_TIME_ACTIVE_SECONDS",
- "DEVTOOLS_TABS_OPEN_AVERAGE_LINEAR",
- "DEVTOOLS_TABS_OPEN_PEAK_LINEAR",
- "DEVTOOLS_TABS_PINNED_AVERAGE_LINEAR",
- "DEVTOOLS_TABS_PINNED_PEAK_LINEAR",
"DEVTOOLS_TILT_TIME_ACTIVE_SECONDS",
"DEVTOOLS_TOOLBOX_TIME_ACTIVE_SECONDS",
"DEVTOOLS_WEBAUDIOEDITOR_TIME_ACTIVE_SECONDS",
"DEVTOOLS_WEBCONSOLE_TIME_ACTIVE_SECONDS",
"DEVTOOLS_WEBIDE_CONNECTED_RUNTIME_APP_TYPE",
"DEVTOOLS_WEBIDE_CONNECTED_RUNTIME_ID",
"DEVTOOLS_WEBIDE_CONNECTED_RUNTIME_OS",
"DEVTOOLS_WEBIDE_CONNECTED_RUNTIME_PLATFORM_VERSION",