summaryrefslogtreecommitdiff
path: root/cli/bench/deno_common.js
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2021-09-21 12:34:27 +0200
committerGitHub <noreply@github.com>2021-09-21 12:34:27 +0200
commitac8b6689b2bb7831e264127ffb4e409bc91bfa4f (patch)
treef8b7708435e08460808d2cd2e36e19831087db37 /cli/bench/deno_common.js
parent923c5432e06aec6ec705304b818bba21c2b497d8 (diff)
bench(deno_common): track new Request() (#12164)
Indirectly tests for: - url parsing - abort signal no-ops - webidl & other overhead
Diffstat (limited to 'cli/bench/deno_common.js')
-rw-r--r--cli/bench/deno_common.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/cli/bench/deno_common.js b/cli/bench/deno_common.js
index 1e3034c27..cc54b1036 100644
--- a/cli/bench/deno_common.js
+++ b/cli/bench/deno_common.js
@@ -71,6 +71,10 @@ function benchRead128k() {
);
}
+function benchRequestNew() {
+ return benchSync("request_new", 5e5, () => new Request("https://deno.land"));
+}
+
async function main() {
// v8 builtin that's close to the upper bound non-NOPs
benchDateNow();
@@ -83,5 +87,6 @@ async function main() {
benchReadZero();
benchWriteNull();
await benchRead128k();
+ benchRequestNew();
}
await main();