Merge pull request #6177 from matrix-org/gsouquet/benchmark-tracking

This commit is contained in:
Germain 2021-06-15 14:17:59 +01:00 committed by GitHub
commit bef20dde48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 6 deletions

View File

@ -20,8 +20,19 @@ jobs:
test/end-to-end-tests/logs/**/*
test/end-to-end-tests/synapse/installations/consent/homeserver.log
retention-days: 14
- name: Archive performance benchmark
uses: actions/upload-artifact@v2
- name: Download previous benchmark data
uses: actions/cache@v1
with:
name: performance-entries.json
path: test/end-to-end-tests/performance-entries.json
path: ./cache
key: ${{ runner.os }}-benchmark
- name: Store benchmark result
uses: matrix-org/github-action-benchmark@jsperfentry-1
with:
tool: 'jsperformanceentry'
output-file-path: test/end-to-end-tests/performance-entries.json
fail-on-alert: false
comment-on-alert: true
# Only temporary to monitor where failures occur
alert-comment-cc-users: '@gsouquet'
github-token: ${{ secrets.DEPLOY_GH_PAGES }}
auto-push: ${{ github.ref == 'refs/heads/develop' }}

View File

@ -1953,6 +1953,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
// Create and start the client
await Lifecycle.setLoggedIn(credentials);
await this.postLoginSetup();
PerformanceMonitor.instance.stop(PerformanceEntryNames.LOGIN);
PerformanceMonitor.instance.stop(PerformanceEntryNames.REGISTER);
};

View File

@ -79,7 +79,7 @@ async function runTests() {
await new Promise((resolve) => setTimeout(resolve, 5 * 60 * 1000));
}
const performanceEntries = {};
let performanceEntries;
await Promise.all(sessions.map(async (session) => {
// Collecting all performance monitoring data before closing the session
@ -95,7 +95,11 @@ async function runTests() {
}, true);
return measurements;
});
performanceEntries[session.username] = JSON.parse(measurements);
/**
* TODO: temporary only use one user session data
*/
performanceEntries = JSON.parse(measurements);
return session.close();
}));
fs.writeFileSync(`performance-entries.json`, JSON.stringify(performanceEntries));