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:
parent
07b24e6fa1
commit
d00180bba8
2 changed files with 9 additions and 3 deletions
|
@ -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'
|
||||
|
|
10
run-tests.js
10
run-tests.js
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue