diff --git a/perf/efps/index.ts b/perf/efps/index.ts index beec496f4eb..34b51c35dd2 100644 --- a/perf/efps/index.ts +++ b/perf/efps/index.ts @@ -143,8 +143,8 @@ for (let i = 0; i < tests.length; i++) { sanityPkgPath: localSanityPkgPath, log: () => {}, }) - const localResult2 = await runTest({ - prefix: `Running test '${test.name}' [${i + 1}/${tests.length}] with local… 2`, + const baseResult1 = await runTest({ + prefix: `Running '${test.name}' [${i + 1}/${tests.length}] with 'sanity@${tag}'… 1`, test, resultsDir, client, @@ -153,8 +153,8 @@ for (let i = 0; i < tests.length; i++) { sanityPkgPath: localSanityPkgPath, log: () => {}, }) - const localResult3 = await runTest({ - prefix: `Running test '${test.name}' [${i + 1}/${tests.length}] with local… 3`, + const localResult2 = await runTest({ + prefix: `Running test '${test.name}' [${i + 1}/${tests.length}] with local… 2`, test, resultsDir, client, @@ -163,41 +163,24 @@ for (let i = 0; i < tests.length; i++) { sanityPkgPath: localSanityPkgPath, log: () => {}, }) - - const localResults = localResult1.map((result1, index) => { - const result2 = localResult2[index] - const result3 = localResult3[index] - - let min = result1 - const arr = [result1, result2, result3] - - for (const item of arr) { - if (item.p50 < min.p50) { - min = item - } - } - - return min - }) - - const baseResult1 = await runTest({ - prefix: `Running '${test.name}' [${i + 1}/${tests.length}] with 'sanity@${tag}'… 1`, + const baseResult2 = await runTest({ + prefix: `Running '${test.name}' [${i + 1}/${tests.length}] with 'sanity@${tag}'… 2`, test, resultsDir, client, headless, projectId, - sanityPkgPath: baseSanityPkgPath, + sanityPkgPath: localSanityPkgPath, log: () => {}, }) - const baseResult2 = await runTest({ - prefix: `Running '${test.name}' [${i + 1}/${tests.length}] with 'sanity@${tag}'… 2`, + const localResult3 = await runTest({ + prefix: `Running test '${test.name}' [${i + 1}/${tests.length}] with local… 3`, test, resultsDir, client, headless, projectId, - sanityPkgPath: baseSanityPkgPath, + sanityPkgPath: localSanityPkgPath, log: () => {}, }) const baseResult3 = await runTest({ @@ -207,10 +190,26 @@ for (let i = 0; i < tests.length; i++) { client, headless, projectId, - sanityPkgPath: baseSanityPkgPath, + sanityPkgPath: localSanityPkgPath, log: () => {}, }) + const localResults = localResult1.map((result1, index) => { + const result2 = localResult2[index] + const result3 = localResult3[index] + + let min = result1 + const arr = [result1, result2, result3] + + for (const item of arr) { + if (item.p50 < min.p50) { + min = item + } + } + + return min + }) + const baseResults = baseResult1.map((result1, index) => { const result2 = baseResult2[index] const result3 = baseResult3[index]