Skip to content

Commit

Permalink
exact same
Browse files Browse the repository at this point in the history
  • Loading branch information
ricokahler committed Sep 26, 2024
1 parent a3164a3 commit 2d72c2e
Showing 1 changed file with 27 additions and 28 deletions.
55 changes: 27 additions & 28 deletions perf/efps/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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({
Expand All @@ -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]
Expand Down

0 comments on commit 2d72c2e

Please sign in to comment.