зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1585330 - Add more log in browsertime_pageload.js r=rwood
Adds log info in browsertime_pageload.js Differential Revision: https://phabricator.services.mozilla.com/D47784 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
61213de3b1
Коммит
a460e9917d
|
@ -1,16 +1,24 @@
|
|||
/* eslint-env node */
|
||||
|
||||
module.exports = async function(context, commands) {
|
||||
context.log.info("Starting a browsertime pageload");
|
||||
let url = context.options.browsertime.url;
|
||||
let page_cycles = context.options.browsertime.page_cycles;
|
||||
let page_cycle_delay = context.options.browsertime.page_cycle_delay;
|
||||
let foreground_delay = context.options.browsertime.foreground_delay;
|
||||
|
||||
await commands.wait.byTime(context.options.browsertime.foreground_delay);
|
||||
context.log.info("Waiting for %d ms (foreground_delay)", foreground_delay);
|
||||
await commands.wait.byTime(foreground_delay);
|
||||
|
||||
context.log.info("Navigating to about:blank");
|
||||
await commands.navigate("about:blank");
|
||||
|
||||
for (let count = 0; count < page_cycles; count++) {
|
||||
context.log.info("Cycle %d, waiting for %d ms", count, page_cycle_delay);
|
||||
await commands.wait.byTime(page_cycle_delay);
|
||||
context.log.info("Cycle %d, starting the measure", count);
|
||||
await commands.measure.start(url);
|
||||
}
|
||||
context.log.info("Browsertime pageload ended.");
|
||||
return true;
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче