summaryrefslogtreecommitdiff
path: root/cli/bench/fs/README.md
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2022-09-22 14:39:25 +0530
committerGitHub <noreply@github.com>2022-09-22 14:39:25 +0530
commit698a340ad7cbbea5d6782c4f410fb50a6d09dc4d (patch)
tree316164ab9ef00f6fda6f0ac642ddde0d4bc52981 /cli/bench/fs/README.md
parent11ced3c10e5e9f896b3e06370e390635ab4f12c8 (diff)
perf: fs optimizations - part 1 (#15873)
Diffstat (limited to 'cli/bench/fs/README.md')
-rw-r--r--cli/bench/fs/README.md26
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/
+```