Bug 1296723 - Remove logOncePerBrowserVersion telemetry functions and probes r=jryans

MozReview-Commit-ID: AvUuzTgoEhz

--HG--
extra : rebase_source : 22fa33853eb70a2ad780d162f6af545db57e0b43
This commit is contained in:
Michael Ratcliffe 2018-05-09 12:01:35 +01:00
parent 3df73f73cd
commit 0725240652
7 changed files with 0 additions and 56 deletions

View File

@ -11,7 +11,6 @@ const SPLITCONSOLE_ENABLED_PREF = "devtools.toolbox.splitconsoleEnabled";
const SPLITCONSOLE_HEIGHT_PREF = "devtools.toolbox.splitconsoleHeight"; const SPLITCONSOLE_HEIGHT_PREF = "devtools.toolbox.splitconsoleHeight";
const DISABLE_AUTOHIDE_PREF = "ui.popup.disable_autohide"; const DISABLE_AUTOHIDE_PREF = "ui.popup.disable_autohide";
const HOST_HISTOGRAM = "DEVTOOLS_TOOLBOX_HOST"; const HOST_HISTOGRAM = "DEVTOOLS_TOOLBOX_HOST";
const SCREENSIZE_HISTOGRAM = "DEVTOOLS_SCREEN_RESOLUTION_ENUMERATED_PER_USER";
const CURRENT_THEME_SCALAR = "devtools.current_theme"; const CURRENT_THEME_SCALAR = "devtools.current_theme";
const HTML_NS = "http://www.w3.org/1999/xhtml"; const HTML_NS = "http://www.w3.org/1999/xhtml";
const REGEX_PANEL = /webconsole|inspector|jsdebugger|styleeditor|netmonitor|storage/; const REGEX_PANEL = /webconsole|inspector|jsdebugger|styleeditor|netmonitor|storage/;
@ -51,8 +50,6 @@ loader.lazyRequireGetter(this, "showDoorhanger",
"devtools/client/shared/doorhanger", true); "devtools/client/shared/doorhanger", true);
loader.lazyRequireGetter(this, "createPerformanceFront", loader.lazyRequireGetter(this, "createPerformanceFront",
"devtools/shared/fronts/performance", true); "devtools/shared/fronts/performance", true);
loader.lazyRequireGetter(this, "system",
"devtools/shared/system");
loader.lazyRequireGetter(this, "getPreferenceFront", loader.lazyRequireGetter(this, "getPreferenceFront",
"devtools/shared/fronts/preference", true); "devtools/shared/fronts/preference", true);
loader.lazyRequireGetter(this, "KeyShortcuts", loader.lazyRequireGetter(this, "KeyShortcuts",
@ -718,8 +715,6 @@ Toolbox.prototype = {
_pingTelemetry: function() { _pingTelemetry: function() {
this.telemetry.toolOpened("toolbox"); this.telemetry.toolOpened("toolbox");
this.telemetry.logOncePerBrowserVersion(SCREENSIZE_HISTOGRAM,
system.getScreenDimensions());
this.telemetry.getHistogramById(HOST_HISTOGRAM).add(this._getTelemetryHostId()); this.telemetry.getHistogramById(HOST_HISTOGRAM).add(this._getTelemetryHostId());
// Log current theme. The question we want to answer is: // Log current theme. The question we want to answer is:

View File

@ -317,11 +317,6 @@ pref("devtools.editor.detectindentation", true);
pref("devtools.editor.enableCodeFolding", true); pref("devtools.editor.enableCodeFolding", true);
pref("devtools.editor.autocomplete", 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 // Whether to reload when touch simulation is toggled
pref("devtools.responsive.reloadConditions.touchSimulation", false); pref("devtools.responsive.reloadConditions.touchSimulation", false);
// Whether to reload when user agent is changed // Whether to reload when user agent is changed

View File

@ -13,7 +13,6 @@
const Services = require("Services"); const Services = require("Services");
const { TelemetryStopwatch } = require("resource://gre/modules/TelemetryStopwatch.jsm"); const { TelemetryStopwatch } = require("resource://gre/modules/TelemetryStopwatch.jsm");
const { getNthPathExcluding } = require("devtools/shared/platform/stack"); const { getNthPathExcluding } = require("devtools/shared/platform/stack");
const TOOLS_OPENED_PREF = "devtools.telemetry.tools.opened.version";
// Object to be shared among all instances. // Object to be shared among all instances.
const PENDING_EVENTS = new Map(); const PENDING_EVENTS = new Map();
@ -27,7 +26,6 @@ class Telemetry {
this.scalarSet = this.scalarSet.bind(this); this.scalarSet = this.scalarSet.bind(this);
this.scalarAdd = this.scalarAdd.bind(this); this.scalarAdd = this.scalarAdd.bind(this);
this.keyedScalarAdd = this.keyedScalarAdd.bind(this); this.keyedScalarAdd = this.keyedScalarAdd.bind(this);
this.logOncePerBrowserVersion = this.logOncePerBrowserVersion.bind(this);
this.recordEvent = this.recordEvent.bind(this); this.recordEvent = this.recordEvent.bind(this);
this.setEventRecordingEnabled = this.setEventRecordingEnabled.bind(this); this.setEventRecordingEnabled = this.setEventRecordingEnabled.bind(this);
this.preparePendingEvent = this.preparePendingEvent.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 * Event telemetry is disabled by default. Use this method to enable it for
* a particular category. * a particular category.

View File

@ -26,7 +26,5 @@ function checkResults() {
checkTelemetry("DEVTOOLS_TOOLBOX_TIME_ACTIVE_SECONDS", "", null, "hasentries"); checkTelemetry("DEVTOOLS_TOOLBOX_TIME_ACTIVE_SECONDS", "", null, "hasentries");
checkTelemetry("DEVTOOLS_INSPECTOR_TIME_ACTIVE_SECONDS", "", null, "hasentries"); checkTelemetry("DEVTOOLS_INSPECTOR_TIME_ACTIVE_SECONDS", "", null, "hasentries");
checkTelemetry("DEVTOOLS_RULEVIEW_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"); checkTelemetry("DEVTOOLS_TOOLBOX_HOST", "", null, "hasentries");
} }

View File

@ -27,7 +27,6 @@ class TelemetryHelpers {
* Clear all telemetry types. * Clear all telemetry types.
*/ */
stopTelemetry() { stopTelemetry() {
this.clearToolsOpenedPref();
Services.telemetry.canRecordExtended = this.oldCanRecord; Services.telemetry.canRecordExtended = this.oldCanRecord;
// Clear histograms, scalars and Telemetry Events. // 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. * Check the value of a given telemetry histogram.
* *

View File

@ -10009,13 +10009,6 @@
"releaseChannelCollection": "opt-out", "releaseChannelCollection": "opt-out",
"description": "What runtime version did WebIDE connect to?" "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": { "DEVTOOLS_SAVE_HEAP_SNAPSHOT_MS": {
"record_in_processes": ["main", "content"], "record_in_processes": ["main", "content"],
"expires_in_version": "never", "expires_in_version": "never",

View File

@ -128,7 +128,6 @@
"DEVTOOLS_PERFTOOLS_SELECTED_VIEW_MS", "DEVTOOLS_PERFTOOLS_SELECTED_VIEW_MS",
"DEVTOOLS_READ_HEAP_SNAPSHOT_MS", "DEVTOOLS_READ_HEAP_SNAPSHOT_MS",
"DEVTOOLS_SAVE_HEAP_SNAPSHOT_MS", "DEVTOOLS_SAVE_HEAP_SNAPSHOT_MS",
"DEVTOOLS_SCREEN_RESOLUTION_ENUMERATED_PER_USER",
"DEVTOOLS_WEBIDE_CONNECTION_DEBUG_USED", "DEVTOOLS_WEBIDE_CONNECTION_DEBUG_USED",
"DEVTOOLS_WEBIDE_CONNECTION_PLAY_USED", "DEVTOOLS_WEBIDE_CONNECTION_PLAY_USED",
"DEVTOOLS_WEBIDE_CONNECTION_TIME_SECONDS", "DEVTOOLS_WEBIDE_CONNECTION_TIME_SECONDS",
@ -644,7 +643,6 @@
"DEVTOOLS_PERFTOOLS_SELECTED_VIEW_MS", "DEVTOOLS_PERFTOOLS_SELECTED_VIEW_MS",
"DEVTOOLS_READ_HEAP_SNAPSHOT_MS", "DEVTOOLS_READ_HEAP_SNAPSHOT_MS",
"DEVTOOLS_SAVE_HEAP_SNAPSHOT_MS", "DEVTOOLS_SAVE_HEAP_SNAPSHOT_MS",
"DEVTOOLS_SCREEN_RESOLUTION_ENUMERATED_PER_USER",
"DEVTOOLS_WEBIDE_CONNECTION_DEBUG_USED", "DEVTOOLS_WEBIDE_CONNECTION_DEBUG_USED",
"DEVTOOLS_WEBIDE_CONNECTION_PLAY_USED", "DEVTOOLS_WEBIDE_CONNECTION_PLAY_USED",
"DEVTOOLS_WEBIDE_CONNECTION_TIME_SECONDS", "DEVTOOLS_WEBIDE_CONNECTION_TIME_SECONDS",