summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/bench/deno_common.js5
-rw-r--r--cli/bench/http/deno_flash_send_file.js2
2 files changed, 6 insertions, 1 deletions
diff --git a/cli/bench/deno_common.js b/cli/bench/deno_common.js
index abafdc519..074346d28 100644
--- a/cli/bench/deno_common.js
+++ b/cli/bench/deno_common.js
@@ -23,6 +23,11 @@ Deno.bench("perf_now", { n: 5e5 }, () => {
performance.now();
});
+Deno.bench("open_file_sync", () => {
+ const file = Deno.openSync("./cli/bench/testdata/128k.bin");
+ file.close();
+});
+
// A common "language feature", that should be fast
// also a decent representation of a non-trivial JSON-op
{
diff --git a/cli/bench/http/deno_flash_send_file.js b/cli/bench/http/deno_flash_send_file.js
index 261f5a207..db2ad7a82 100644
--- a/cli/bench/http/deno_flash_send_file.js
+++ b/cli/bench/http/deno_flash_send_file.js
@@ -7,7 +7,7 @@ const { serve } = Deno;
const path = new URL("../testdata/128k.bin", import.meta.url).pathname;
function handler() {
- const file = Deno.openSync(path, { read: true });
+ const file = Deno.openSync(path);
return new Response(file.readable);
}