aboutsummaryrefslogtreecommitdiff
path: root/bench/snippets/realpath.mjs
blob: 4793ee3d67ae150b2d692ccd4d8b92c766de5c49 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
import { realpathSync } from "node:fs";
const count = parseInt(process.env.ITERATIONS || "1", 10) || 1;
const arg = process.argv[process.argv.length - 1];
import { bench, run } from "./runner.mjs";

bench("realpathSync x " + count, () => {
  for (let i = 0; i < count; i++) realpathSync(arg, "utf-8");
});

await run();