diff options
Diffstat (limited to 'cli/bench/fs/README.md')
-rw-r--r-- | cli/bench/fs/README.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/cli/bench/fs/README.md b/cli/bench/fs/README.md new file mode 100644 index 000000000..122a70cfd --- /dev/null +++ b/cli/bench/fs/README.md @@ -0,0 +1,26 @@ +## `fs` benchmarks + +### adding new benchmarks + +```js +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 + +```bash +deno run -A --unstable run.mjs +node run.js +``` + +### view report + +```bash +deno run --allow-net=127.0.0.1:9000 serve.jsx +# View rendered report at http://127.0.0.1:9000/ +``` |