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 authored May 15, 2023
1 parent 505bac2 commit 362a39d
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 362a39d

Please sign in to comment.