Update to track test timings separate for Azure and Actions (#12083)

* Update to track test timings separate for Azure and Actions

* Add azure test flag
This commit is contained in:
JJ Kasper 2020-04-21 15:11:04 -05:00 committed by GitHub
parent 07b24e6fa1
commit d00180bba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View file

@ -62,5 +62,5 @@ jobs:
displayName: 'Install dependencies'
- script: |
node run-tests.js -g $(group) --timings
node run-tests.js -g $(group) --timings --azure
displayName: 'Run tests'

View file

@ -22,6 +22,7 @@ const TIMINGS_API = `https://next-timings.jjsweb.site/api/timings`
parseInt(process.argv[concurrencyIdx + 1], 10) || DEFAULT_CONCURRENCY
const outputTimings = process.argv.indexOf('--timings') !== -1
const isAzure = process.argv.indexOf('--azure') !== -1
const groupIdx = process.argv.indexOf('-g')
const groupArg = groupIdx !== -1 && process.argv[groupIdx + 1]
@ -38,7 +39,9 @@ const TIMINGS_API = `https://next-timings.jjsweb.site/api/timings`
if (outputTimings && groupArg) {
console.log('Fetching previous timings data')
try {
const timingsRes = await fetch(TIMINGS_API)
const timingsRes = await fetch(
`${TIMINGS_API}?which=${isAzure ? 'azure' : 'actions'}`
)
if (!timingsRes.ok) {
throw new Error(`request status: ${timingsRes.status}`)
@ -237,7 +240,10 @@ const TIMINGS_API = `https://next-timings.jjsweb.site/api/timings`
headers: {
'content-type': 'application/json',
},
body: JSON.stringify({ timings: curTimings }),
body: JSON.stringify({
timings: curTimings,
which: isAzure ? 'azure' : 'actions',
}),
})
if (!timingsRes.ok) {