deno/cli/bench/fs
2024-08-12 12:41:32 -04:00
..
.gitignore
README.md
run.mjs chore: update the copyright of c, mjs, and jsx (#25005) 2024-08-12 12:41:32 -04:00
serve.jsx chore: update the copyright of c, mjs, and jsx (#25005) 2024-08-12 12:41:32 -04:00

fs benchmarks

adding new benchmarks

const copyFileSync = getFunction("copyFileSync");
bench(() => copyFileSync("test", "test2"));

// For functions with side-effects, clean up after `bench` like so:
const removeSync = getFunction("removeSync");
removeSync("test2");

running

deno run -A --unstable run.mjs
node run.js

view report

deno run --allow-net=127.0.0.1:9000 serve.jsx
# View rendered report at http://127.0.0.1:9000/