Add extra wait time between Crux calls (#3536)

This commit is contained in:
Peter Hedenskog 2022-01-20 14:17:52 +01:00 committed by GitHub
parent b05e73f012
commit 11c25bc85b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -23,6 +23,12 @@ const DEFAULT_METRICS_SUMMARY = [
'originLoadingExperience.*.CUMULATIVE_LAYOUT_SHIFT_SCORE.*'
];
function wait(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
const CRUX_WAIT_TIME = 300;
module.exports = {
name() {
return path.basename(__dirname);
@ -120,6 +126,7 @@ module.exports = {
);
}
}
await wait(CRUX_WAIT_TIME);
}
queue.postMessage(make('crux.summary', originResult, { group }));
}
@ -161,6 +168,7 @@ module.exports = {
);
}
}
await wait(CRUX_WAIT_TIME);
}
// Attach origin result so we can show it in the HTML
urlResult.originLoadingExperience =