Bug 1502873 - More tweaks for raptor gecko profiling support; r=jmaher

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Rob Wood 2018-10-31 21:24:58 +00:00
Родитель 562313a39a
Коммит f5b7112fd5
16 изменённых файлов: 25 добавлений и 28 удалений

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

@ -16,7 +16,7 @@ lower_is_better = true
alert_threshold = 2.0
page_timeout = 60000
gecko_profile_interval = 1
gecko_profile_entries = 2000000
gecko_profile_entries = 14000000
[raptor-google-docs-firefox]
apps = firefox

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

@ -13,7 +13,7 @@ unit = score
lower_is_better = false
alert_threshold = 2.0
gecko_profile_interval = 1
gecko_profile_entries = 2000000
gecko_profile_entries = 8000000
[raptor-motionmark-animometer-firefox]
apps = firefox

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

@ -13,7 +13,7 @@ unit = score
lower_is_better = false
alert_threshold = 2.0
gecko_profile_interval = 1
gecko_profile_entries = 2000000
gecko_profile_entries = 8000000
[raptor-motionmark-htmlsuite-firefox]
apps = firefox

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

@ -15,7 +15,7 @@ lower_is_better = false
subtest_lower_is_better = true
alert_threshold = 2.0
gecko_profile_interval = 1
gecko_profile_entries = 2000000
gecko_profile_entries = 14000000
[raptor-speedometer-firefox]
apps = firefox

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

@ -13,7 +13,7 @@ unit = score
lower_is_better = false
alert_threshold = 2.0
gecko_profile_interval = 1
gecko_profile_entries = 2000000
gecko_profile_entries = 8000000
[raptor-stylebench-firefox]
apps = firefox

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

@ -13,7 +13,7 @@ unit = ms
lower_is_better = true
alert_threshold = 2.0
gecko_profile_interval = 1
gecko_profile_entries = 2000000
gecko_profile_entries = 8000000
[raptor-sunspider-firefox]
apps = firefox

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

@ -18,7 +18,7 @@ alert_threshold = 2.0
# beyond typical pageload time
page_timeout = 30000
gecko_profile_interval = 1
gecko_profile_entries = 2000000
gecko_profile_entries = 14000000
[raptor-tp6-amazon-firefox]
apps = firefox

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

@ -7,7 +7,7 @@ unit = score
lower_is_better = false
alert_threshold = 2.0
gecko_profile_interval = 1
gecko_profile_entries = 2000000
gecko_profile_entries = 8000000
[raptor-unity-webgl-firefox]
apps = firefox

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

@ -13,6 +13,8 @@ unit = ms
lower_is_better = true
alert_threshold = 2.0
newtab_per_cycle = true
gecko_profile_interval = 1
gecko_profile_entries = 8000000
[raptor-wasm-godot-baseline-firefox]
apps = firefox

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

@ -13,6 +13,8 @@ unit = ms
lower_is_better = true
alert_threshold = 2.0
newtab_per_cycle = true
gecko_profile_interval = 1
gecko_profile_entries = 8000000
[raptor-wasm-godot-ion-firefox]
apps = firefox

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

@ -13,6 +13,8 @@ unit = ms
lower_is_better = true
alert_threshold = 2.0
newtab_per_cycle = true
gecko_profile_interval = 1
gecko_profile_entries = 8000000
[raptor-wasm-godot-firefox]
apps = firefox

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

@ -13,7 +13,7 @@ unit = ms
lower_is_better = true
alert_threshold = 2.0
gecko_profile_interval = 1
gecko_profile_entries = 2000000
gecko_profile_entries = 4000000
[raptor-wasm-misc-baseline-firefox]
apps = firefox

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

@ -13,7 +13,7 @@ unit = ms
lower_is_better = true
alert_threshold = 2.0
gecko_profile_interval = 1
gecko_profile_entries = 2000000
gecko_profile_entries = 4000000
[raptor-wasm-misc-ion-firefox]
apps = firefox

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

@ -13,7 +13,7 @@ unit = ms
lower_is_better = true
alert_threshold = 2.0
gecko_profile_interval = 1
gecko_profile_entries = 2000000
gecko_profile_entries = 4000000
[raptor-wasm-misc-firefox]
apps = firefox

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

@ -13,7 +13,7 @@ unit = score
lower_is_better = true
alert_threshold = 2.0
gecko_profile_interval = 1
gecko_profile_entries = 2000000
gecko_profile_entries = 4000000
[raptor-webaudio-firefox]
apps = firefox

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

@ -261,19 +261,7 @@ async function stopGeckoProfiling() {
await browser.geckoProfiler.stop();
}
async function pauseGeckoProfiling() {
postToControlServer("status", "pausing gecko profiling");
await browser.geckoProfiler.pause();
}
async function resumeGeckoProfiling() {
postToControlServer("status", "resuming gecko profiling");
await browser.geckoProfiler.resume();
}
async function getGeckoProfile() {
// pause the profiler
await pauseGeckoProfiling();
// get the profile and send to control server
postToControlServer("status", "retrieving gecko profile");
let arrayBuffer = await browser.geckoProfiler.getProfileAsArrayBuffer();
@ -281,20 +269,22 @@ async function getGeckoProfile() {
let profile = JSON.parse(textDecoder.decode(arrayBuffer));
console.log(profile);
postToControlServer("gecko_profile", [testName, pageCycle, profile]);
// stop the profiler; must stop so it clears before next cycle
await stopGeckoProfiling();
// resume if we have more pagecycles left
if (pageCycle + 1 <= pageCycles) {
await resumeGeckoProfiling();
await startGeckoProfiling();
}
}
function nextCycle() {
async function nextCycle() {
pageCycle++;
if (pageCycle == 1) {
let text = "running " + pageCycles + " pagecycles of " + testURL;
postToControlServer("status", text);
// start the profiler if enabled
if (geckoProfiling) {
startGeckoProfiling();
await startGeckoProfiling();
}
}
if (pageCycle <= pageCycles) {
@ -482,7 +472,8 @@ function cleanUp() {
} else if (testType == "benchmark") {
console.log("benchmark complete");
}
// if profiling was enabled, stop the profiler
// if profiling was enabled, stop the profiler - may have already
// been stopped but stop again here in cleanup in case of timeout
if (geckoProfiling) {
stopGeckoProfiling();
}