diff options
author | 2023-06-18 10:47:42 -0700 | |
---|---|---|
committer | 2023-06-18 10:47:42 -0700 | |
commit | fdb7940c4e435a5b7f5a368f4168d748baf6b5b6 (patch) | |
tree | ee23b0ee654cb7ff9307ccc1db961fed444e01f6 /bench/snippets/realpath.mjs | |
parent | 873f615358b78f913b3f8fe6adda47da7e6e57ac (diff) | |
download | bun-fdb7940c4e435a5b7f5a368f4168d748baf6b5b6.tar.gz bun-fdb7940c4e435a5b7f5a368f4168d748baf6b5b6.tar.zst bun-fdb7940c4e435a5b7f5a368f4168d748baf6b5b6.zip |
Fix a bunch of bugs (#3352)
* Fix a bunch of bugs
* undo that one
* Fix crash in readdir()
* woops
* woops
* Add comment
* :scissors:
* Make `readlink()` and `realpath` use much less memory
* Update BunString.cpp
* woopsie
* Unnecessary
* Don't commit these
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
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(); |