0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-30 09:08:00 -04:00
denoland-deno/cli/tests/unit_node
Matt Mastracci 23ff0e722e
feat(ext/web): resourceForReadableStream (#20180)
Extracted from fast streams work.

This is a resource wrapper for `ReadableStream`, allowing us to treat
all `ReadableStream` instances as resources, and remove special paths in
both `fetch` and `serve`.

Performance with a ReadableStream response yields ~18% improvement:

```
  return new Response(new ReadableStream({
    start(controller) {
      controller.enqueue(new Uint8Array([104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100]));
      controller.close();
    }
  })
```

This patch:

```
12:36 $ third_party/prebuilt/mac/wrk http://localhost:8080
Running 10s test @ http://localhost:8080
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    99.96us  100.03us   6.65ms   98.84%
    Req/Sec    47.73k     2.43k   51.02k    89.11%
  959308 requests in 10.10s, 117.10MB read
Requests/sec:  94978.71
Transfer/sec:     11.59MB
```

main:

```
Running 10s test @ http://localhost:8080
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   163.03us  685.51us  19.73ms   99.27%
    Req/Sec    39.50k     3.98k   66.11k    95.52%
  789582 requests in 10.10s, 82.83MB read
Requests/sec:  78182.65
Transfer/sec:      8.20MB
```
2023-08-17 07:52:37 -06:00
..
_fs fix: bump default @types/node version range to 18.16.19 (#19706) 2023-07-04 15:27:04 +00:00
crypto fix(node): object keys in publicEncrypt (#20128) 2023-08-11 07:34:23 +00:00
internal refactor(node/crypto): scrypt polyfill to rust (#18746) 2023-04-18 14:29:10 +02:00
testdata fix(ext/node): support brotli APIs (#19223) 2023-06-24 19:42:08 +05:30
_test_utils.ts test(ext/node): port _fs tests from std/node (#18262) 2023-03-20 01:10:39 +09:00
assertion_error_test.ts test(ext/node): added assertion errors test (#19609) 2023-06-30 11:22:04 +09:00
async_hooks_test.ts fix(ext/http): replace await Deno.serve with await Deno.serve().finished (#19485) 2023-06-13 18:05:23 +00:00
buffer_test.ts chore: fix typos (#19572) 2023-06-26 09:10:27 -04:00
child_process_test.ts chore(cli): Fix test that locks up on some M2 macs (#19989) 2023-07-31 07:29:00 -06:00
fs_test.ts fix(ext/node): implement "ascii" encoding for node:fs writeFile() (#18097) 2023-03-16 12:16:03 +09:00
http2_test.ts chore: Use relative paths for assert imports to avoid test flakes (#19427) 2023-06-08 18:10:37 +00:00
http_test.ts feat(ext/web): resourceForReadableStream (#20180) 2023-08-17 07:52:37 -06:00
module_test.ts refactor: rename built-in node modules from ext:deno_node/ to node: (#19680) 2023-07-02 20:19:30 +02:00
net_test.ts fix(node/net): Server connection callback include socket value (#19779) 2023-07-19 00:33:43 +02:00
os_test.ts feat(node/os): implement getPriority, setPriority & userInfo (#19370) 2023-07-31 22:29:09 +02:00
path_test.ts test(ext/node): clean up node:path test cases (#19610) 2023-07-05 16:13:34 +09:00
perf_hooks_test.ts fix(ext/node): Define performance.timeOrigin as getter property (#19714) 2023-07-04 20:19:18 +03:00
process_test.ts fix(node): polyfill process.title (#20044) 2023-08-04 14:31:13 +02:00
querystring_test.ts test(ext/node): add querystring_test.ts and readline_test.ts (#18256) 2023-03-19 19:49:11 +09:00
readline_test.ts fix(npm): process not defined in readline (#19184) 2023-05-18 15:42:27 -04:00
repl_test.ts fix(node): repl._builtinLibs (#20046) 2023-08-04 14:30:48 +02:00
stream_test.ts fix(ext/node): fix stream/promises export (#19820) 2023-07-17 22:10:34 +09:00
string_decoder_test.ts test(ext/node): add string_decoder_test.ts from std/node (#18473) 2023-03-29 18:32:29 +09:00
timers_test.ts fix(ext/node): ignore cancelled timer when node timer refresh (#19637) 2023-07-02 19:11:34 +00:00
tls_test.ts fix(node): implement TLSSocket._start (#20120) 2023-08-11 11:57:41 +00:00
tty_test.ts test(ext/node): add tty_test and util_test (#17868) 2023-02-23 12:28:19 +09:00
util_test.ts Revert "refactor(ext/node): Use Deno.inspect (#17960)" (#18491) 2023-03-30 15:33:28 +00:00
v8_test.ts fix(node): make 'v8.setFlagsFromString' a noop (#19271) 2023-05-26 15:41:03 +02:00
worker_threads_test.ts chore: fix typos (#19572) 2023-06-26 09:10:27 -04:00
zlib_test.ts fix(ext/node): support dictionary option in zlib init (#20035) 2023-08-11 11:42:35 +00:00