perf/basic: Add some helpful logging
This is purely to see that things are happening when running this test. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
This commit is contained in:
parent
cf47b4a347
commit
faff190364
@ -16,6 +16,8 @@ const Scripting = imports.ui.scripting;
|
|||||||
var METRICS = {};
|
var METRICS = {};
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
|
console.debug('Running basic perf test');
|
||||||
|
|
||||||
/* eslint-disable no-await-in-loop */
|
/* eslint-disable no-await-in-loop */
|
||||||
Scripting.defineScriptEvent('topBarNavStart', 'Starting to navigate the top bar');
|
Scripting.defineScriptEvent('topBarNavStart', 'Starting to navigate the top bar');
|
||||||
Scripting.defineScriptEvent('topBarNavDone', 'Done navigating the top bar');
|
Scripting.defineScriptEvent('topBarNavDone', 'Done navigating the top bar');
|
||||||
@ -34,6 +36,8 @@ async function run() {
|
|||||||
await Scripting.sleep(1000);
|
await Scripting.sleep(1000);
|
||||||
|
|
||||||
// navigate through top bar
|
// navigate through top bar
|
||||||
|
|
||||||
|
console.debug('Navigate through top bar');
|
||||||
Scripting.scriptEvent('topBarNavStart');
|
Scripting.scriptEvent('topBarNavStart');
|
||||||
Main.panel.statusArea.aggregateMenu.menu.open();
|
Main.panel.statusArea.aggregateMenu.menu.open();
|
||||||
await Scripting.sleep(400);
|
await Scripting.sleep(400);
|
||||||
@ -48,6 +52,7 @@ async function run() {
|
|||||||
await Scripting.sleep(1000);
|
await Scripting.sleep(1000);
|
||||||
|
|
||||||
// notification
|
// notification
|
||||||
|
console.debug('Show notification message');
|
||||||
const source = new MessageTray.SystemNotificationSource();
|
const source = new MessageTray.SystemNotificationSource();
|
||||||
Main.messageTray.add(source);
|
Main.messageTray.add(source);
|
||||||
|
|
||||||
@ -60,6 +65,7 @@ async function run() {
|
|||||||
source.showNotification(notification);
|
source.showNotification(notification);
|
||||||
await Scripting.sleep(400);
|
await Scripting.sleep(400);
|
||||||
|
|
||||||
|
console.debug('Show date menu');
|
||||||
Main.panel.statusArea.dateMenu.menu.open();
|
Main.panel.statusArea.dateMenu.menu.open();
|
||||||
await Scripting.sleep(400);
|
await Scripting.sleep(400);
|
||||||
|
|
||||||
@ -67,9 +73,11 @@ async function run() {
|
|||||||
notification.connect('destroy',
|
notification.connect('destroy',
|
||||||
() => Scripting.scriptEvent('notificationCloseDone'));
|
() => Scripting.scriptEvent('notificationCloseDone'));
|
||||||
|
|
||||||
|
console.debug('Destroy notification message');
|
||||||
notification.destroy();
|
notification.destroy();
|
||||||
await Scripting.sleep(400);
|
await Scripting.sleep(400);
|
||||||
|
|
||||||
|
console.debug('Close date menu');
|
||||||
Main.panel.statusArea.dateMenu.menu.close();
|
Main.panel.statusArea.dateMenu.menu.close();
|
||||||
await Scripting.waitLeisure();
|
await Scripting.waitLeisure();
|
||||||
|
|
||||||
@ -85,21 +93,27 @@ async function run() {
|
|||||||
await Scripting.sleep(1000);
|
await Scripting.sleep(1000);
|
||||||
|
|
||||||
// overview (app picker)
|
// overview (app picker)
|
||||||
|
console.debug('Showing overview');
|
||||||
Main.overview.show();
|
Main.overview.show();
|
||||||
await Scripting.waitLeisure();
|
await Scripting.waitLeisure();
|
||||||
|
|
||||||
Scripting.scriptEvent('applicationsShowStart');
|
Scripting.scriptEvent('applicationsShowStart');
|
||||||
|
console.debug('Showing applications');
|
||||||
// eslint-disable-next-line require-atomic-updates
|
// eslint-disable-next-line require-atomic-updates
|
||||||
Main.overview.dash.showAppsButton.checked = true;
|
Main.overview.dash.showAppsButton.checked = true;
|
||||||
await Scripting.waitLeisure();
|
await Scripting.waitLeisure();
|
||||||
Scripting.scriptEvent('applicationsShowDone');
|
Scripting.scriptEvent('applicationsShowDone');
|
||||||
|
console.debug('Hiding applications');
|
||||||
// eslint-disable-next-line require-atomic-updates
|
// eslint-disable-next-line require-atomic-updates
|
||||||
Main.overview.dash.showAppsButton.checked = false;
|
Main.overview.dash.showAppsButton.checked = false;
|
||||||
await Scripting.waitLeisure();
|
await Scripting.waitLeisure();
|
||||||
|
|
||||||
|
console.debug('Hiding overview');
|
||||||
Main.overview.hide();
|
Main.overview.hide();
|
||||||
await Scripting.waitLeisure();
|
await Scripting.waitLeisure();
|
||||||
/* eslint-enable no-await-in-loop */
|
/* eslint-enable no-await-in-loop */
|
||||||
|
|
||||||
|
console.debug('Finished basic perf test');
|
||||||
}
|
}
|
||||||
|
|
||||||
let topBarNav = false;
|
let topBarNav = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user