Backed out changeset d4e89e0e7e9b (bug 1840917) for causing bc failures in browser/components/migration/tests/browser/browser_entrypoint_telemetry.js CLOSED TREE

This commit is contained in:
Sandor Molnar 2023-06-30 04:48:41 +03:00
Родитель 21248857c1
Коммит 1d4be990b0
6 изменённых файлов: 0 добавлений и 91 удалений

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

@ -24,7 +24,6 @@ var gFileMigrators = null;
var gProfileStartup = null;
var gL10n = null;
var gPreviousDefaultBrowserKey = "";
var gHasOpenedLegacyWizard = false;
let gForceExitSpinResolve = false;
let gKeepUndoData = false;
@ -690,11 +689,6 @@ class MigrationUtils {
return Promise.resolve();
}
// Legacy migration dialog
if (!gHasOpenedLegacyWizard) {
gHasOpenedLegacyWizard = true;
aOptions.openedTime = Cu.now();
}
const DIALOG_URL = "chrome://browser/content/migration/migration.xhtml";
let features = "chrome,dialog,modal,centerscreen,titlebar,resizable=no";
if (AppConstants.platform == "macosx" && !this.isStartupMigration) {

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

@ -35,12 +35,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
LoginCSVImport: "resource://gre/modules/LoginCSVImport.jsm",
});
/**
* Set to true once the first instance of MigrationWizardParent has received
* a "GetAvailableMigrators" message.
*/
let gHasOpenedBefore = false;
/**
* This class is responsible for communicating with MigrationUtils to do the
* actual heavy-lifting of any kinds of migration work, based on messages from
@ -81,8 +75,6 @@ export class MigrationWizardParent extends JSWindowActorParent {
switch (message.name) {
case "GetAvailableMigrators": {
let start = Cu.now();
let availableMigrators = [];
for (const key of MigrationUtils.availableMigratorKeys) {
availableMigrators.push(this.#getMigratorAndProfiles(key));
@ -106,15 +98,6 @@ export class MigrationWizardParent extends JSWindowActorParent {
return b.lastModifiedDate - a.lastModifiedDate;
});
let elapsed = Cu.now() - start;
if (!gHasOpenedBefore) {
gHasOpenedBefore = true;
Services.telemetry.scalarSet(
"migration.time_to_produce_migrator_list",
elapsed
);
}
return filteredResults;
}

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

@ -42,7 +42,6 @@ var MigrationWizard = {
_autoMigrate: null,
_receivedPermissions: new Set(),
_succeededMigrationEventArgs: null,
_openedTime: null,
init() {
Services.telemetry.setEventRecordingEnabled("browser.migration", true);
@ -72,14 +71,6 @@ var MigrationWizard = {
.getHistogramById("FX_MIGRATION_ENTRY_POINT")
.add(entryPointId);
// If the caller passed openedTime, that means this is the first time that
// the migration wizard is opening, and we want to measure its performance.
// Stash the time that opening was invoked so that we can measure the
// total elapsed time when the source list is shown.
if (args.openedTime) {
this._openedTime = args.openedTime;
}
this.isInitialMigration =
entrypoint == MigrationUtils.MIGRATION_ENTRYPOINTS.FIRSTRUN;
@ -298,17 +289,6 @@ var MigrationWizard = {
document.getElementById("importAll").hidden = true;
}
// This must be the first time we're opening the migration wizard,
// and we want to know how long it took to get to this point, where
// we're showing the source list.
if (this._openedTime !== null) {
let elapsed = Cu.now() - this._openedTime;
Services.telemetry.scalarSet(
"migration.time_to_produce_legacy_migrator_list",
elapsed
);
}
// Advance to the next page if the caller told us to.
if (this._migrator && this._skipImportSourcePage) {
this._wiz.advance();

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

@ -54,15 +54,6 @@ add_task(async function test_successful_migrations() {
]);
});
// We should make sure that the migration.time_to_produce_migrator_list
// scalar was set, since we know that at least one migration wizard has
// been opened.
let scalars = TelemetryTestUtils.getProcessScalars("parent", false, false);
Assert.ok(
scalars["migration.time_to_produce_migrator_list"] > 0,
"Non-zero scalar value recorded for migration.time_to_produce_migrator_list"
);
// Scenario 2: Several resource types are available, but only 1
// is checked / expected.
migration = waitForTestMigration(

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

@ -99,13 +99,4 @@ add_task(async function test_legacy_wizard() {
TelemetryTestUtils.assertHistogram(legacyHistogram, entrypointId, 1);
}
}
// We should make sure that the migration.time_to_produce_legacy_migrator_list
// scalar was set, since we know that at least one legacy migration wizard has
// been opened.
let scalars = TelemetryTestUtils.getProcessScalars("parent", false, false);
Assert.ok(
scalars["migration.time_to_produce_legacy_migrator_list"] > 0,
"Non-zero scalar value recorded for migration.time_to_produce_migrator_list"
);
});

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

@ -8348,36 +8348,6 @@ migration:
- 'firefox'
record_in_processes:
- main
time_to_produce_legacy_migrator_list:
bug_numbers:
- 1840917
description: >
The amount of time it took in milliseconds to produce the list of migrators in the
legacy migration wizard.
expires: never
kind: uint
notification_emails:
- mconley@mozilla.com
release_channel_collection: opt-out
products:
- 'firefox'
record_in_processes:
- main
time_to_produce_migrator_list:
bug_numbers:
- 1840917
description: >
The amount of time it took in milliseconds to produce the list of migrators and profiles
for the first time the migration wizard opened during the process lifetime.
expires: never
kind: uint
notification_emails:
- mconley@mozilla.com
release_channel_collection: opt-out
products:
- 'firefox'
record_in_processes:
- main
contextual.services.topsites:
impression: