diff options
Diffstat (limited to 'cli/bench/http')
-rw-r--r-- | cli/bench/http/deno_http_flash_ops.js | 10 | ||||
-rw-r--r-- | cli/bench/http/deno_http_ops.js | 11 |
2 files changed, 11 insertions, 10 deletions
diff --git a/cli/bench/http/deno_http_flash_ops.js b/cli/bench/http/deno_http_flash_ops.js index 1ef2f65ed..7b024f9af 100644 --- a/cli/bench/http/deno_http_flash_ops.js +++ b/cli/bench/http/deno_http_flash_ops.js @@ -3,12 +3,10 @@ // deno-lint-ignore-file const { - core: { - opAsync, - ops: { op_flash_make_request, op_flash_serve }, - encode, - }, -} = Deno; + opAsync, + ops: { op_flash_make_request, op_flash_serve }, + encode, +} = Deno[Deno.internal].core; const addr = Deno.args[0] || "127.0.0.1:4500"; const [hostname, port] = addr.split(":"); const serverId = op_flash_serve({ hostname, port, reuseport: true }); diff --git a/cli/bench/http/deno_http_ops.js b/cli/bench/http/deno_http_ops.js index 3fd0bef31..216a47905 100644 --- a/cli/bench/http/deno_http_ops.js +++ b/cli/bench/http/deno_http_ops.js @@ -13,7 +13,10 @@ class Http { [Symbol.asyncIterator]() { return { next: async () => { - const reqEvt = await Deno.core.opAsync("op_http_accept", this.id); + const reqEvt = await Deno[Deno.internal].core.opAsync( + "op_http_accept", + this.id, + ); return { value: reqEvt ?? undefined, done: reqEvt === null }; }, }; @@ -21,20 +24,20 @@ class Http { } for await (const conn of tcp) { - const id = Deno.core.ops.op_http_start(conn.rid); + const id = Deno[Deno.internal].core.ops.op_http_start(conn.rid); const http = new Http(id); (async () => { for await (const req of http) { if (req == null) continue; const { 0: stream } = req; - await Deno.core.opAsync( + await Deno[Deno.internal].core.opAsync( "op_http_write_headers", stream, 200, [], "Hello World", ); - Deno.core.close(stream); + Deno[Deno.internal].core.close(stream); } })(); } |