Bug 1602903 - Collect per-window useRemoteSubframes telemetry, r=mconley

This telemetry records, for each toplevel window, the relationship between the
actual fission-enabled status of the window, and the "fission.autostart" pref.

This takes the form of a categorized telemetry histogram with the following
keys:
 * EnabledByAutostart:  useRemoteSubframes == true   fission.autostart == true
 * EnabledByUser:       useRemoteSubframes == true   fission.autostart == false
 * DisabledByAutostart: useRemoteSubframes == false  fission.autostart == false
 * DisabledByUser:      useRemoteSubframes == false  fission.autostart == true

'DisabledByUser' helps indicate useful information such as how often fission
testers need to open non-fission windows due to breakage, while
'EnabledByAutostart' and 'EnabledByUser' helps give a better image of how many
people are testing fission.

Differential Revision: https://phabricator.services.mozilla.com/D61927

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nika Layzell 2020-02-10 21:46:51 +00:00
Родитель fc773ab807
Коммит 6ff27537b1
2 изменённых файлов: 32 добавлений и 0 удалений

Просмотреть файл

@ -2303,6 +2303,8 @@ var gBrowserInit = {
NewTabPagePreloading.maybeCreatePreloadedBrowser(window);
});
scheduleIdleTask(reportRemoteSubframesEnabledTelemetry);
if (AppConstants.NIGHTLY_BUILD) {
scheduleIdleTask(() => {
FissionTestingUI.init();
@ -9401,6 +9403,21 @@ var ConfirmationHint = {
},
};
function reportRemoteSubframesEnabledTelemetry() {
let autostart = Services.prefs.getBoolPref("fission.autostart");
let categoryLabel = gFissionBrowser ? "Enabled" : "Disabled";
if (autostart == gFissionBrowser) {
categoryLabel += "ByAutostart";
} else {
categoryLabel += "ByUser";
}
Services.telemetry
.getHistogramById("WINDOW_REMOTE_SUBFRAMES_ENABLED_STATUS")
.add(categoryLabel);
}
if (AppConstants.NIGHTLY_BUILD) {
var FissionTestingUI = {
init() {

Просмотреть файл

@ -15069,5 +15069,20 @@
"n_buckets": 100,
"bug_numbers": [1597956],
"description": "milliseconds to complete a TLS session resumption with external cache"
},
"WINDOW_REMOTE_SUBFRAMES_ENABLED_STATUS": {
"record_in_processes": ["main"],
"products": ["firefox"],
"alert_emails": ["nika@mozilla.com"],
"expires_in_version": "82",
"kind": "categorical",
"labels": [
"EnabledByAutostart",
"EnabledByUser",
"DisabledByAutostart",
"DisabledByUser"
],
"bug_numbers": [1602903],
"description": "Fission enabled status of individual windows in fission.autostart and non-fission.autostart profiles"
}
}