diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 3f82e61280..273dea1062 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -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' }} diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index 16da9321e2..0af2d3d635 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -1953,6 +1953,7 @@ export default class MatrixChat extends React.PureComponent { // Create and start the client await Lifecycle.setLoggedIn(credentials); await this.postLoginSetup(); + PerformanceMonitor.instance.stop(PerformanceEntryNames.LOGIN); PerformanceMonitor.instance.stop(PerformanceEntryNames.REGISTER); }; diff --git a/test/end-to-end-tests/start.js b/test/end-to-end-tests/start.js index f29b485c84..c1588e848e 100644 --- a/test/end-to-end-tests/start.js +++ b/test/end-to-end-tests/start.js @@ -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));