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

fix: benchmark tooling failing calling node modules bin dir directly #4474

Merged
merged 1 commit into from
May 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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