Skip to content

Commit

Permalink
Merge pull request #2120 from rwblair/master
Browse files Browse the repository at this point in the history
bump schema package version
  • Loading branch information
effigies authored Sep 3, 2024
2 parents 690a34a + 22b9dd3 commit 4c15670
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
2 changes: 1 addition & 1 deletion bids-validator/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"imports": {
"@ajv": "npm:[email protected]",
"@bids/schema": "jsr:@bids/[email protected]-dev.2+7f1f6737",
"@bids/schema": "jsr:@bids/[email protected]",
"@cliffy/command": "jsr:@cliffy/[email protected]",
"@cliffy/table": "jsr:@cliffy/[email protected]",
"@hed/validator": "npm:[email protected]",
Expand Down
22 changes: 0 additions & 22 deletions bids-validator/src/schema/entities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,25 +70,3 @@ Deno.test('test readEntities', async (t) => {
})
})
})

Deno.test('test readEntities performance', (t) => {
const generateStart = performance.now()
const testFilenames = []
for (let n = 0; n < 200000; n++) {
testFilenames.push(generateBIDSFilename(Math.floor(Math.random() * 4)))
}
const generateEnd = performance.now()
const normalizePerf = generateEnd - generateStart

const start = performance.now()
for (const each of testFilenames) {
readEntities(each)
}
const end = performance.now()
const readEntitiesTime = end - start

const perfRatio = readEntitiesTime / normalizePerf + Number.EPSILON
const message = `readEntities() runtime ratio: ${perfRatio.toFixed(2)}`
console.log(message)
assert(perfRatio < 2, message)
})

0 comments on commit 4c15670

Please sign in to comment.