mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
Add workflow steps to track measurements
This commit is contained in:
parent
e84d51bc0a
commit
7000176572
21
.github/workflows/develop.yml
vendored
21
.github/workflows/develop.yml
vendored
@ -20,8 +20,21 @@ jobs:
|
|||||||
test/end-to-end-tests/logs/**/*
|
test/end-to-end-tests/logs/**/*
|
||||||
test/end-to-end-tests/synapse/installations/consent/homeserver.log
|
test/end-to-end-tests/synapse/installations/consent/homeserver.log
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
- name: Archive performance benchmark
|
- name: Download previous benchmark data
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
name: performance-entries.json
|
path: ./cache
|
||||||
path: test/end-to-end-tests/performance-entries.json
|
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
|
||||||
|
@ -79,7 +79,7 @@ async function runTests() {
|
|||||||
await new Promise((resolve) => setTimeout(resolve, 5 * 60 * 1000));
|
await new Promise((resolve) => setTimeout(resolve, 5 * 60 * 1000));
|
||||||
}
|
}
|
||||||
|
|
||||||
const performanceEntries = {};
|
let performanceEntries;
|
||||||
|
|
||||||
await Promise.all(sessions.map(async (session) => {
|
await Promise.all(sessions.map(async (session) => {
|
||||||
// Collecting all performance monitoring data before closing the session
|
// Collecting all performance monitoring data before closing the session
|
||||||
@ -95,7 +95,11 @@ async function runTests() {
|
|||||||
}, true);
|
}, true);
|
||||||
return measurements;
|
return measurements;
|
||||||
});
|
});
|
||||||
performanceEntries[session.username] = JSON.parse(measurements);
|
|
||||||
|
/**
|
||||||
|
* TODO: temporary only use one user session data
|
||||||
|
*/
|
||||||
|
performanceEntries = JSON.parse(measurements);
|
||||||
return session.close();
|
return session.close();
|
||||||
}));
|
}));
|
||||||
fs.writeFileSync(`performance-entries.json`, JSON.stringify(performanceEntries));
|
fs.writeFileSync(`performance-entries.json`, JSON.stringify(performanceEntries));
|
||||||
|
Loading…
Reference in New Issue
Block a user