Files
bun.sh/bench/snippets/realpath.mjs
2024-09-03 21:32:52 -07:00

11 lines
320 B
JavaScript

import { realpathSync } from "node:fs";
import { bench, run } from "./runner.mjs";
const count = parseInt(process.env.ITERATIONS || "1", 10) || 1;
const arg = process.argv[process.argv.length - 1];
bench("realpathSync x " + count, () => {
for (let i = 0; i < count; i++) realpathSync(arg, "utf-8");
});
await run();