diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2022-10-28 04:20:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-28 16:50:17 +0530 |
commit | e18950284f279cfa8ec090cb8a882dbd64e92d4a (patch) | |
tree | 2ba6be798fe8d2393f7701693c1c545a237a2575 /core/examples/http_bench_json_ops.js | |
parent | d9e425a9472981e8a1df025c29bbad609123e783 (diff) |
Reland "perf(core): generate inlined wrappers for async ops" (#16455)
Reland https://github.com/denoland/deno/pull/16428
Diffstat (limited to 'core/examples/http_bench_json_ops.js')
-rw-r--r-- | core/examples/http_bench_json_ops.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/examples/http_bench_json_ops.js b/core/examples/http_bench_json_ops.js index 883ef1752..261d91559 100644 --- a/core/examples/http_bench_json_ops.js +++ b/core/examples/http_bench_json_ops.js @@ -2,6 +2,8 @@ // This is not a real HTTP server. We read blindly one time into 'requestBuf', // then write this fixed 'responseBuf'. The point of this benchmark is to // exercise the event loop in a simple yet semi-realistic way. +Deno.core.initializeAsyncOps(); + const requestBuf = new Uint8Array(64 * 1024); const responseBuf = new Uint8Array( "HTTP/1.1 200 OK\r\nContent-Length: 12\r\n\r\nHello World\n" @@ -16,7 +18,7 @@ function listen() { /** Accepts a connection, returns rid. */ function accept(serverRid) { - return Deno.core.opAsync("op_accept", serverRid); + return Deno.core.ops.op_accept(serverRid); } async function serve(rid) { |