-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/parallel-handle-with-infinity-and-ne…
…gative-numbers
- Loading branch information
Showing
14 changed files
with
272 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
import { execa } from 'execa' | ||
import type { BenchmarkReport } from './reporter.ts' | ||
|
||
const tsx = './scripts/benchmarks/node_modules/.bin/tsx' | ||
const runner = './scripts/benchmarks/vitest-bench.ts' | ||
|
||
export function runVitest(file: string) { | ||
export async function runVitest(file: string) { | ||
console.log(`Running benchmarks in ./${file}`) | ||
|
||
return execa(tsx, [runner, file], { reject: false }).then(result => { | ||
if (result.exitCode !== 0) { | ||
console.error(result.stderr) | ||
throw new Error('Benchmark failed. See above for details.') | ||
} | ||
return JSON.parse(result.stdout) as BenchmarkReport[] | ||
const result = await execa('node', ['scripts/run', 'bench-file', file], { | ||
reject: false, | ||
}) | ||
if (result.exitCode !== 0) { | ||
console.error(result.stderr) | ||
throw new Error('Benchmark failed. See above for details.') | ||
} | ||
return JSON.parse(result.stdout) as BenchmarkReport[] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.