diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-04-03 19:01:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-03 19:01:02 +0200 |
commit | 51d3fb78ad2453e649d01bcc833ecfec1a05d685 (patch) | |
tree | a093cd2ad4faf1cb1fc069de8c406aeef69e1b5a /cli/bench/http/deno_http_flash_ops.js | |
parent | 2846bbe0a3de0cc366006f97023ce146112c40c9 (diff) |
refactor: remove "ext/flash" (#18578)
With https://github.com/denoland/deno/pull/18568 landed we no longer
need "ext/flash".
This commit removes "deno_flash" extension completely.
This should have some impact on the binary and snapshot size.
Closes https://github.com/denoland/deno/issues/17356
Diffstat (limited to 'cli/bench/http/deno_http_flash_ops.js')
-rw-r--r-- | cli/bench/http/deno_http_flash_ops.js | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/cli/bench/http/deno_http_flash_ops.js b/cli/bench/http/deno_http_flash_ops.js deleted file mode 100644 index 7b024f9af..000000000 --- a/cli/bench/http/deno_http_flash_ops.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. - -// deno-lint-ignore-file - -const { - 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 }); -const serverPromise = opAsync("op_flash_drive_server", serverId); - -const fastOps = op_flash_make_request(); -function nextRequest() { - return fastOps.nextRequest(); -} -function respond(token, response) { - return fastOps.respond(token, response, true); -} - -const response = encode( - "HTTP/1.1 200 OK\r\nContent-Length: 11\r\n\r\nHello World", -); -let offset = 0; -while (true) { - let token = nextRequest(); - if (token === 0) token = await opAsync("op_flash_next_async", serverId); - for (let i = offset; i < offset + token; i++) { - respond( - i, - response, - ); - } - offset += token; -} |