mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-09 05:14:24 +00:00
Bug 1296723
- Remove logOncePerBrowserVersion telemetry functions and probes r=jryans
MozReview-Commit-ID: AvUuzTgoEhz --HG-- extra : rebase_source : 22fa33853eb70a2ad780d162f6af545db57e0b43
This commit is contained in:
parent
3df73f73cd
commit
0725240652
@ -11,7 +11,6 @@ const SPLITCONSOLE_ENABLED_PREF = "devtools.toolbox.splitconsoleEnabled";
|
||||
const SPLITCONSOLE_HEIGHT_PREF = "devtools.toolbox.splitconsoleHeight";
|
||||
const DISABLE_AUTOHIDE_PREF = "ui.popup.disable_autohide";
|
||||
const HOST_HISTOGRAM = "DEVTOOLS_TOOLBOX_HOST";
|
||||
const SCREENSIZE_HISTOGRAM = "DEVTOOLS_SCREEN_RESOLUTION_ENUMERATED_PER_USER";
|
||||
const CURRENT_THEME_SCALAR = "devtools.current_theme";
|
||||
const HTML_NS = "http://www.w3.org/1999/xhtml";
|
||||
const REGEX_PANEL = /webconsole|inspector|jsdebugger|styleeditor|netmonitor|storage/;
|
||||
@ -51,8 +50,6 @@ loader.lazyRequireGetter(this, "showDoorhanger",
|
||||
"devtools/client/shared/doorhanger", true);
|
||||
loader.lazyRequireGetter(this, "createPerformanceFront",
|
||||
"devtools/shared/fronts/performance", true);
|
||||
loader.lazyRequireGetter(this, "system",
|
||||
"devtools/shared/system");
|
||||
loader.lazyRequireGetter(this, "getPreferenceFront",
|
||||
"devtools/shared/fronts/preference", true);
|
||||
loader.lazyRequireGetter(this, "KeyShortcuts",
|
||||
@ -718,8 +715,6 @@ Toolbox.prototype = {
|
||||
_pingTelemetry: function() {
|
||||
this.telemetry.toolOpened("toolbox");
|
||||
|
||||
this.telemetry.logOncePerBrowserVersion(SCREENSIZE_HISTOGRAM,
|
||||
system.getScreenDimensions());
|
||||
this.telemetry.getHistogramById(HOST_HISTOGRAM).add(this._getTelemetryHostId());
|
||||
|
||||
// Log current theme. The question we want to answer is:
|
||||
|
@ -317,11 +317,6 @@ pref("devtools.editor.detectindentation", true);
|
||||
pref("devtools.editor.enableCodeFolding", true);
|
||||
pref("devtools.editor.autocomplete", true);
|
||||
|
||||
// Pref to store the browser version at the time of a telemetry ping for an
|
||||
// opened developer tool. This allows us to ping telemetry just once per browser
|
||||
// version for each user.
|
||||
pref("devtools.telemetry.tools.opened.version", "{}");
|
||||
|
||||
// Whether to reload when touch simulation is toggled
|
||||
pref("devtools.responsive.reloadConditions.touchSimulation", false);
|
||||
// Whether to reload when user agent is changed
|
||||
|
@ -13,7 +13,6 @@
|
||||
const Services = require("Services");
|
||||
const { TelemetryStopwatch } = require("resource://gre/modules/TelemetryStopwatch.jsm");
|
||||
const { getNthPathExcluding } = require("devtools/shared/platform/stack");
|
||||
const TOOLS_OPENED_PREF = "devtools.telemetry.tools.opened.version";
|
||||
|
||||
// Object to be shared among all instances.
|
||||
const PENDING_EVENTS = new Map();
|
||||
@ -27,7 +26,6 @@ class Telemetry {
|
||||
this.scalarSet = this.scalarSet.bind(this);
|
||||
this.scalarAdd = this.scalarAdd.bind(this);
|
||||
this.keyedScalarAdd = this.keyedScalarAdd.bind(this);
|
||||
this.logOncePerBrowserVersion = this.logOncePerBrowserVersion.bind(this);
|
||||
this.recordEvent = this.recordEvent.bind(this);
|
||||
this.setEventRecordingEnabled = this.setEventRecordingEnabled.bind(this);
|
||||
this.preparePendingEvent = this.preparePendingEvent.bind(this);
|
||||
@ -271,29 +269,6 @@ class Telemetry {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Log info about usage once per browser version. This allows us to discover
|
||||
* how many individual users are using our tools for each browser version.
|
||||
*
|
||||
* @param {String} perUserHistogram
|
||||
* Histogram in which the data is to be stored.
|
||||
*/
|
||||
logOncePerBrowserVersion(perUserHistogram, value) {
|
||||
let currentVersion = Services.appinfo.version;
|
||||
let latest = Services.prefs.getCharPref(TOOLS_OPENED_PREF);
|
||||
let latestObj = JSON.parse(latest);
|
||||
|
||||
let lastVersionHistogramUpdated = latestObj[perUserHistogram];
|
||||
|
||||
if (typeof lastVersionHistogramUpdated == "undefined" ||
|
||||
lastVersionHistogramUpdated !== currentVersion) {
|
||||
latestObj[perUserHistogram] = currentVersion;
|
||||
latest = JSON.stringify(latestObj);
|
||||
Services.prefs.setCharPref(TOOLS_OPENED_PREF, latest);
|
||||
this.getHistogramById(perUserHistogram).add(value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Event telemetry is disabled by default. Use this method to enable it for
|
||||
* a particular category.
|
||||
|
@ -26,7 +26,5 @@ function checkResults() {
|
||||
checkTelemetry("DEVTOOLS_TOOLBOX_TIME_ACTIVE_SECONDS", "", null, "hasentries");
|
||||
checkTelemetry("DEVTOOLS_INSPECTOR_TIME_ACTIVE_SECONDS", "", null, "hasentries");
|
||||
checkTelemetry("DEVTOOLS_RULEVIEW_TIME_ACTIVE_SECONDS", "", null, "hasentries");
|
||||
checkTelemetry(
|
||||
"DEVTOOLS_SCREEN_RESOLUTION_ENUMERATED_PER_USER", "", null, "hasentries");
|
||||
checkTelemetry("DEVTOOLS_TOOLBOX_HOST", "", null, "hasentries");
|
||||
}
|
||||
|
@ -27,7 +27,6 @@ class TelemetryHelpers {
|
||||
* Clear all telemetry types.
|
||||
*/
|
||||
stopTelemetry() {
|
||||
this.clearToolsOpenedPref();
|
||||
Services.telemetry.canRecordExtended = this.oldCanRecord;
|
||||
|
||||
// Clear histograms, scalars and Telemetry Events.
|
||||
@ -73,15 +72,6 @@ class TelemetryHelpers {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the pref that is used to log telemetry data once per browser version.
|
||||
*/
|
||||
clearToolsOpenedPref() {
|
||||
const TOOLS_OPENED_PREF = "devtools.telemetry.tools.opened.version";
|
||||
|
||||
Services.prefs.clearUserPref(TOOLS_OPENED_PREF);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the value of a given telemetry histogram.
|
||||
*
|
||||
|
@ -10009,13 +10009,6 @@
|
||||
"releaseChannelCollection": "opt-out",
|
||||
"description": "What runtime version did WebIDE connect to?"
|
||||
},
|
||||
"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_SAVE_HEAP_SNAPSHOT_MS": {
|
||||
"record_in_processes": ["main", "content"],
|
||||
"expires_in_version": "never",
|
||||
|
@ -128,7 +128,6 @@
|
||||
"DEVTOOLS_PERFTOOLS_SELECTED_VIEW_MS",
|
||||
"DEVTOOLS_READ_HEAP_SNAPSHOT_MS",
|
||||
"DEVTOOLS_SAVE_HEAP_SNAPSHOT_MS",
|
||||
"DEVTOOLS_SCREEN_RESOLUTION_ENUMERATED_PER_USER",
|
||||
"DEVTOOLS_WEBIDE_CONNECTION_DEBUG_USED",
|
||||
"DEVTOOLS_WEBIDE_CONNECTION_PLAY_USED",
|
||||
"DEVTOOLS_WEBIDE_CONNECTION_TIME_SECONDS",
|
||||
@ -644,7 +643,6 @@
|
||||
"DEVTOOLS_PERFTOOLS_SELECTED_VIEW_MS",
|
||||
"DEVTOOLS_READ_HEAP_SNAPSHOT_MS",
|
||||
"DEVTOOLS_SAVE_HEAP_SNAPSHOT_MS",
|
||||
"DEVTOOLS_SCREEN_RESOLUTION_ENUMERATED_PER_USER",
|
||||
"DEVTOOLS_WEBIDE_CONNECTION_DEBUG_USED",
|
||||
"DEVTOOLS_WEBIDE_CONNECTION_PLAY_USED",
|
||||
"DEVTOOLS_WEBIDE_CONNECTION_TIME_SECONDS",
|
||||
|
Loading…
Reference in New Issue
Block a user