Bug 1621650 - Make Firefox Platform the default profiler preset on Nightly and Local builds; r=canaltinova

Platform engineers spend most of their time in Nightly and on local builds. This patch
changes it so that the profiler is most likely set to a more advanced preset when platform
engineers need it.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Greg Tatum 2020-03-11 23:10:53 +00:00
Родитель 03c4e8912a
Коммит 4de8535d88
6 изменённых файлов: 28 добавлений и 10 удалений

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

@ -13,6 +13,9 @@ add_task(async function test() {
ok(true, "This platform does not support stackwalking, skip this test.");
return;
}
// This test assumes that the Web Developer preset is set by default, which is
// not the case on Nightly and custom builds.
BackgroundJSM.changePreset("aboutprofiling", "web-developer");
await withAboutProfiling(async document => {
const webdevPreset = await getNearestInputFromText(

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

@ -11,6 +11,9 @@ add_task(async function test() {
ok(true, "This platform does not support stackwalking, skip this test.");
return;
}
// This test assumes that the Web Developer preset is set by default, which is
// not the case on Nightly and custom builds.
BackgroundJSM.changePreset("aboutprofiling", "web-developer");
await withAboutProfiling(async document => {
const webdev = await getNearestInputFromText(document, "Web Developer");

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

@ -8,6 +8,10 @@ add_task(async function test() {
"Test the behavior of thread toggling and the text summary works as expected."
);
// This test assumes that the Web Developer preset is set by default, which is
// not the case on Nightly and custom builds.
BackgroundJSM.changePreset("aboutprofiling", "web-developer");
await withAboutProfiling(async document => {
const threadTextEl = await getNearestInputFromText(
document,

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

@ -11,6 +11,10 @@ add_task(async function test() {
return;
}
// This test assumes that the Web Developer preset is set by default, which is
// not the case on Nightly and custom builds.
BackgroundJSM.changePreset("aboutprofiling", "web-developer");
await withDevToolsPanel(async document => {
{
const presets = await getNearestInputFromText(document, "Settings");

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

@ -3,12 +3,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const BackgroundJSM = ChromeUtils.import(
"resource://devtools/client/performance-new/popup/background.jsm.js"
);
registerCleanupFunction(() => {
// Always clean up the prefs after every test.
const { revertRecordingPreferences } = ChromeUtils.import(
"resource://devtools/client/performance-new/popup/background.jsm.js"
);
revertRecordingPreferences();
BackgroundJSM.revertRecordingPreferences();
});
/**
@ -387,9 +387,7 @@ async function withDevToolsPanel(callback) {
* @returns {Object}
*/
function getActiveConfiguration() {
const { startProfiler, stopProfiler } = ChromeUtils.import(
"resource://devtools/client/performance-new/popup/background.jsm.js"
);
const { startProfiler, stopProfiler } = BackgroundJSM;
info("Start the profiler with the current about:profiling configuration.");
startProfiler("aboutprofiling");

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

@ -852,8 +852,14 @@ pref("devtools.performance.recording.ui-base-url", "https://profiler.firefox.com
// The preset to use for the recording settings. If set to "custom" then the pref
// values below will be used.
pref("devtools.performance.recording.preset", "web-developer");
pref("devtools.performance.recording.preset.remote", "web-developer");
#if defined(NIGHTLY_BUILD) || !defined(MOZILLA_OFFICIAL)
// Use a more advanced preset on Nightly and local builds.
pref("devtools.performance.recording.preset", "firefox-platform");
pref("devtools.performance.recording.preset.remote", "firefox-platform");
#else
pref("devtools.performance.recording.preset", "web-developer");
pref("devtools.performance.recording.preset.remote", "web-developer");
#endif
// Profiler buffer size. It is the maximum number of 8-bytes entries in the
// profiler's buffer. 10000000 is ~80mb.
pref("devtools.performance.recording.entries", 10000000);