Merge branch 'develop' into show-username

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-06-07 19:37:22 +02:00
commit 025148d9fc
No known key found for this signature in database
GPG key ID: 9760693FDD98A790
454 changed files with 20625 additions and 7587 deletions

View file

@ -1,3 +1,4 @@
node_modules
*.png
element/env
performance-entries.json

View file

@ -93,10 +93,10 @@ module.exports = class ElementSession {
const type = req.resourceType();
const response = await req.response();
//if (type === 'xhr' || type === 'fetch') {
buffer += `${type} ${response.status()} ${req.method()} ${req.url()} \n`;
// if (req.method() === "POST") {
// buffer += " Post data: " + req.postData();
// }
buffer += `${type} ${response.status()} ${req.method()} ${req.url()} \n`;
// if (req.method() === "POST") {
// buffer += " Post data: " + req.postData();
// }
//}
});
return {
@ -208,7 +208,7 @@ module.exports = class ElementSession {
this.log.done();
}
close() {
async close() {
return this.browser.close();
}

View file

@ -79,8 +79,26 @@ async function runTests() {
await new Promise((resolve) => setTimeout(resolve, 5 * 60 * 1000));
}
await Promise.all(sessions.map((session) => session.close()));
const performanceEntries = {};
await Promise.all(sessions.map(async (session) => {
// Collecting all performance monitoring data before closing the session
const measurements = await session.page.evaluate(() => {
let measurements = [];
window.mxPerformanceMonitor.addPerformanceDataCallback({
entryNames: [
window.mxPerformanceEntryNames.REGISTER,
],
callback: (events) => {
measurements = JSON.stringify(events);
},
}, true);
return measurements;
});
performanceEntries[session.username] = JSON.parse(measurements);
return session.close();
}));
fs.writeFileSync(`performance-entries.json`, JSON.stringify(performanceEntries));
if (failure) {
process.exit(-1);
} else {

View file

@ -435,9 +435,9 @@ jsprim@^1.2.2:
verror "1.10.0"
lodash@^4.15.0, lodash@^4.17.11:
version "4.17.19"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b"
integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
mime-db@~1.38.0:
version "1.38.0"