Skip to content

Commit 22b9dd3

Browse files
committed
remove read entitty performance test
1 parent 7a5e820 commit 22b9dd3

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

bids-validator/src/schema/entities.test.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -70,25 +70,3 @@ Deno.test('test readEntities', async (t) => {
7070
})
7171
})
7272
})
73-
74-
Deno.test('test readEntities performance', (t) => {
75-
const generateStart = performance.now()
76-
const testFilenames = []
77-
for (let n = 0; n < 200000; n++) {
78-
testFilenames.push(generateBIDSFilename(Math.floor(Math.random() * 4)))
79-
}
80-
const generateEnd = performance.now()
81-
const normalizePerf = generateEnd - generateStart
82-
83-
const start = performance.now()
84-
for (const each of testFilenames) {
85-
readEntities(each)
86-
}
87-
const end = performance.now()
88-
const readEntitiesTime = end - start
89-
90-
const perfRatio = readEntitiesTime / normalizePerf + Number.EPSILON
91-
const message = `readEntities() runtime ratio: ${perfRatio.toFixed(2)}`
92-
console.log(message)
93-
assert(perfRatio < 2, message)
94-
})

0 commit comments

Comments
 (0)