const { mkdirSync, existsSync } = require("fs"); var performance = globalThis.performance; if (!performance) { try { performance = require("perf_hooks").performance; } catch (e) {} } const count = parseInt(process.env.ITERATIONS || "1", 10) || 1; var tempdir = `/tmp/some-fs-test/dir/${Date.now()}/hi`; for (let i = 0; i < count; i++) { tempdir += `/${i.toString(36)}`; } if (existsSync(tempdir)) { throw new Error( `existsSync reports ${tempdir} exists, but it probably does not` ); } var origTempDir = tempdir; var iterations = new Array(count * count).fill(""); var total = 0; for (let i = 0; i < count; i++) { for (let j = 0; j < count; j++) { iterations[total++] = `${origTempDir}/${j.toString(36)}-${i.toString(36)}`; } } tempdir = origTempDir; mkdirSync(origTempDir, { recursive: true }); const recurse = { recursive: false }; const start = performance.now(); for (let i = 0; i < total; i++) { mkdirSync(iterations[i], recurse); } console.log("MKDIR " + total + " depth took:", performance.now() - start, "ms"); if (!existsSync(tempdir)) { throw new Error( "Expected directory to exist after mkdirSync, but it doesn't" ); } if (mkdirSync(tempdir, { recursive: true })) { throw new Error( "mkdirSync shouldn't return directory name on existing directories" ); } value='ciro/fetch-fix-with-lock'>ciro/fetch-fix-with-lock Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/webcore/JSMessageChannel.h (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2023-08-11Fix using uninitialized variable when formatting `config_path`. (#4129)Gravatar Ai Hoshino 2-1/+21
2023-08-11Deprecate loading `node_modules.bun` (#4131)Gravatar Jarred Sumner 34-2204/+222
2023-08-11`bun-wasm` fixes & improvements (#4126)Gravatar jhmaster 14-44/+252
2023-08-11Support TypeScript's `export type * as Foo from 'bar'` (#4125)Gravatar Jarred Sumner 2-9/+42
2023-08-11Fix wasm buildGravatar Jarred Sumner 1-1/+5
2023-08-10async realpath (#4117)Gravatar Jarred Sumner 6-58/+184
2023-08-10Remove assertionGravatar Jarred Sumner 1-3/+0
2023-08-10More lazily initialize these static stringsGravatar Jarred Sumner 1-5/+7
2023-08-10don't check for trailing slash, var streamGravatar Dylan Conway 3-9/+9
2023-08-10run files without extensions (#4113)Gravatar Dylan Conway 4-11/+46
2023-08-10Fix memory leak in base64url (#4111)Gravatar Jarred Sumner 1-2/+2
2023-08-10Handle thundering herd of setInterval (#4109)Gravatar Jarred Sumner 1-2/+17
2023-08-10fs.zig: create temp files with 0o700, not 0o007 (#4107)Gravatar Adhityaa Chandrasekar 1-1/+1
2023-08-10Update remix guideGravatar Colin McDonnell 1-2/+4
2023-08-10zig fmtGravatar Jarred Sumner 1-4/+4
2023-08-10Fixes #4062 (#4106)Gravatar Jarred Sumner 8-26/+87
2023-08-10bun test: format description of test.each (#4092)Gravatar Jacques 3-13/+311
2023-08-10add util.formatWithOptions (#4090)Gravatar dave caruso 3-9/+30
2023-08-10Fix titleGravatar Colin McDonnell 1-1/+1