diff options
author | 2023-02-06 20:35:59 -0800 | |
---|---|---|
committer | 2023-02-06 20:35:59 -0800 | |
commit | 85611272c6ecc2c9a4912e717c796022467c21b0 (patch) | |
tree | 556b7b35c29b054abf16f388e9afaa6b716d725e | |
parent | c40912b8dc993a1432ba82693dc86f5f40f74f6d (diff) | |
download | bun-85611272c6ecc2c9a4912e717c796022467c21b0.tar.gz bun-85611272c6ecc2c9a4912e717c796022467c21b0.tar.zst bun-85611272c6ecc2c9a4912e717c796022467c21b0.zip |
bump
-rw-r--r-- | bench/snippets/stat.mjs | 17 | ||||
-rw-r--r-- | src/build-id | 2 |
2 files changed, 18 insertions, 1 deletions
diff --git a/bench/snippets/stat.mjs b/bench/snippets/stat.mjs new file mode 100644 index 000000000..92bdf182f --- /dev/null +++ b/bench/snippets/stat.mjs @@ -0,0 +1,17 @@ +import { readdirSync, statSync } from "fs"; +import { bench, run } from "mitata"; +import { argv } from "process"; + +const dir = argv.length > 2 ? argv[2] : "/tmp"; + +const result = statSync(dir); + +bench("Stat.isBlockDevice", () => result.isBlockDevice()); +bench("Stat.isCharacterDevice", () => result.isCharacterDevice()); +bench("Stat.isDirectory", () => result.isDirectory()); +bench("Stat.isFIFO", () => result.isFIFO()); +bench("Stat.isFile", () => result.isFile()); +bench("Stat.isSocket", () => result.isSocket()); +bench("Stat.isSymbolicLink", () => result.isSymbolicLink()); + +await run(); diff --git a/src/build-id b/src/build-id index 7813681f5..62f945751 100644 --- a/src/build-id +++ b/src/build-id @@ -1 +1 @@ -5
\ No newline at end of file +6
\ No newline at end of file |