diff options
Diffstat (limited to 'bench/snippets/realpath.mjs')
-rw-r--r-- | bench/snippets/realpath.mjs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bench/snippets/realpath.mjs b/bench/snippets/realpath.mjs index 9c3793d80..4793ee3d6 100644 --- a/bench/snippets/realpath.mjs +++ b/bench/snippets/realpath.mjs @@ -1,4 +1,10 @@ import { realpathSync } from "node:fs"; const count = parseInt(process.env.ITERATIONS || "1", 10) || 1; const arg = process.argv[process.argv.length - 1]; -for (let i = 0; i < count; i++) realpathSync(arg); +import { bench, run } from "./runner.mjs"; + +bench("realpathSync x " + count, () => { + for (let i = 0; i < count; i++) realpathSync(arg, "utf-8"); +}); + +await run(); |