Skip to content

Commit

Permalink
chore: fix perf test
Browse files Browse the repository at this point in the history
  • Loading branch information
wemeetagain committed Jul 4, 2024
1 parent fc811de commit 876fa3e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .benchrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Mocha opts
extension: ["ts"]
colors: true
node-option:
- "loader=ts-node/register"

# benchmark opts
threshold: 3
maxMs: 60_000
minRuns: 10
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"test": "yarn test:unit && yarn test:spec && yarn test:perf && yarn test:memory",
"test:fuzz": "ts-node test/fuzz/fuzz.test.ts",
"test:memory": "node -r ts-node/register --expose-gc test/memory/memory.test.ts",
"test:perf": "UV_THREADPOOL_SIZE=$(node -e 'console.log(require(`os`).availableParallelism())') NODE_OPTIONS='--loader=ts-node/esm' ts-node-esm node_modules/.bin/benchmark --config .benchrc.yaml test/perf/*.test.ts",
"test:perf": "UV_THREADPOOL_SIZE=$(node -e 'console.log(require(`os`).availableParallelism())') NODE_OPTIONS='--loader=ts-node/register' ts-node node_modules/.bin/benchmark --config .benchrc.yaml test/perf/*.test.ts",
"test:spec": "mocha test/spec/**/*.test.ts",
"test:unit": "mocha test/unit/**/*.test.ts",
"universal": "napi universal",
Expand Down

0 comments on commit 876fa3e

Please sign in to comment.