summaryrefslogtreecommitdiff
path: root/tests/http_bench.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/http_bench.ts')
-rw-r--r--tests/http_bench.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/http_bench.ts b/tests/http_bench.ts
index 0c7970691..5b61bd4cd 100644
--- a/tests/http_bench.ts
+++ b/tests/http_bench.ts
@@ -2,14 +2,13 @@
// TODO Replace this with a real HTTP server once
// https://github.com/denoland/deno/issues/726 is completed.
// Note: this is a keep-alive server.
-import * as deno from "deno";
-const addr = deno.args[1] || "127.0.0.1:4500";
-const listener = deno.listen("tcp", addr);
+const addr = Deno.args[1] || "127.0.0.1:4500";
+const listener = Deno.listen("tcp", addr);
const response = new TextEncoder().encode(
"HTTP/1.1 200 OK\r\nContent-Length: 12\r\n\r\nHello World\n"
);
-async function handle(conn: deno.Conn): Promise<void> {
+async function handle(conn: Deno.Conn): Promise<void> {
const buffer = new Uint8Array(1024);
try {
while (true) {