Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
fix: benchmark tooling failing calling node modules bin dir directly
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjburton committed May 14, 2023
1 parent 22ce6c6 commit 9981723
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions benchmark/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const BENCHMARKS = {
repository: "https://github.com/prettier/prettier.git",
sourceDirectories: {
src: ["js"],
scripts: ["js", "mjs"],
scripts: ["js"],
},
},
},
Expand Down Expand Up @@ -93,7 +93,7 @@ function benchmarkFormatter(rome) {
);

// Run 2 warmups to make sure the files are formatted correctly
const hyperfineCommand = `hyperfine -w 2 -n Prettier "${prettierCommand}" -n "Parallel-Prettier" "${parallelPrettierCommand}" -n dprint "${dprintCommand}" -n Rome "${romeCommand}" --shell=${shellOption()} -n "Rome (1 thread)" "${romeSingleCoreCommand}"`;
const hyperfineCommand = `hyperfine --show-output -w 2 -n Prettier "${prettierCommand}" -n "Parallel-Prettier" "${parallelPrettierCommand}" -n dprint "${dprintCommand}" -n Rome "${romeCommand}" --shell=${shellOption()} -n "Rome (1 thread)" "${romeSingleCoreCommand}"`;
console.log(hyperfineCommand);

child_process.execSync(hyperfineCommand, {
Expand All @@ -108,7 +108,7 @@ function resolvePrettier() {
}

function resolveParallelPrettier() {
return path.resolve("node_modules/.bin/pprettier");
return path.resolve("node_modules/@mixer/parallel-prettier/dist/index.js");
}

function resolveDprint() {
Expand Down

0 comments on commit 9981723

Please sign in to comment.