You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Performance monitoring measurements (#6041)
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user