Add workflow steps to track measurements

pull/21833/head
Germain Souquet 2021-06-14 14:53:22 +01:00
parent e84d51bc0a
commit 7000176572
2 changed files with 23 additions and 6 deletions

View File

@ -20,8 +20,21 @@ 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: Temporary step before having a fully release GitHub action
run: npm install && npm run build
working-directory: /home/runner/work/_actions/matrix-org/github-action-benchmark/9f891b47906b73678ba486f7a53e4807e24fff19
- name: Store benchmark result
uses: matrix-org/github-action-benchmark@9f891b47906b73678ba486f7a53e4807e24fff19
with:
tool: 'jsperformanceentry'
output-file-path: test/end-to-end-tests/performance-entries.json
external-data-json-path: ./cache/benchmark-data-template.json
fail-on-alert: false
- name: Push benchmark result
if: ${{ github.ref == 'refs/heads/develop' }}
run: git push 'https://matrixbot:${{ secrets.DEPLOY_GH_PAGES }}@github.com/matrix-org/matrix-react-sdk.git' gh-pages:gh-pages

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));