1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00
denoland-deno/tests/testdata
Nathan Whitaker e92a05b551
feat(serve): Opt-in parallelism for deno serve (#24920)
Adds a `parallel` flag to `deno serve`. When present, we spawn multiple
workers to parallelize serving requests.


```bash
deno serve --parallel main.ts
```

Currently on linux we use `SO_REUSEPORT` and rely on the fact that the
kernel will distribute connections in a round-robin manner.

On mac and windows, we sort of emulate this by cloning the underlying
file descriptor and passing a handle to each worker. The connections
will not be guaranteed to be fairly distributed (and in practice almost
certainly won't be), but the distribution is still spread enough to
provide a significant performance increase.

---
(Run on an Macbook Pro with an M3 Max, serving `deno.com`

baseline::
```
❯ wrk -d 30s -c 125 --latency http://127.0.0.1:8000
Running 30s test @ http://127.0.0.1:8000
  2 threads and 125 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   239.78ms   13.56ms 330.54ms   79.12%
    Req/Sec   258.58     35.56   360.00     70.64%
  Latency Distribution
     50%  236.72ms
     75%  248.46ms
     90%  256.84ms
     99%  268.23ms
  15458 requests in 30.02s, 2.47GB read
Requests/sec:    514.89
Transfer/sec:     84.33MB
```

this PR (`with --parallel` flag)
```
❯ wrk -d 30s -c 125 --latency http://127.0.0.1:8000
Running 30s test @ http://127.0.0.1:8000
  2 threads and 125 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   117.40ms  142.84ms 590.45ms   79.07%
    Req/Sec     1.33k   175.19     1.77k    69.00%
  Latency Distribution
     50%   22.34ms
     75%  223.67ms
     90%  357.32ms
     99%  460.50ms
  79636 requests in 30.07s, 12.74GB read
Requests/sec:   2647.96
Transfer/sec:    433.71MB
```
2024-08-14 22:26:21 +00:00
..
assets chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
bench chore: migrate bench, publish, and more itests to spec tests (#23584) 2024-04-29 10:08:27 -04:00
benches chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
bundle feat(vendor): support modifying remote files in vendor folder without checksum errors (#23979) 2024-05-28 14:58:43 -04:00
cache chore: migrate bench, publish, and more itests to spec tests (#23584) 2024-04-29 10:08:27 -04:00
cert chore: update to std@2024.07.19 (#24715) 2024-07-25 15:30:28 +10:00
check chore: fix flaky net_listen_allow_localhost_4555 (#23726) 2024-05-07 17:21:56 +00:00
commonjs chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
compile chore: update to std@2024.07.19 (#24715) 2024-07-25 15:30:28 +10:00
coverage chore: update to std@2024.07.19 (#24715) 2024-07-25 15:30:28 +10:00
doc perf: update deno_doc (#24700) 2024-07-24 12:23:16 -07:00
dynamic_import fix(permissions): handle ipv6 addresses correctly (#24397) 2024-07-05 23:45:06 +01:00
encoding chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
eval feat(cli): Add --env-file as alternative to --env (#24555) 2024-08-08 06:50:57 -07:00
file_extensions chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
fmt feat(fmt): support HTML, Svelte, Vue, Astro and Angular (#25019) 2024-08-14 22:58:48 +02:00
image fix(ext/web): properly handle Blob case for createImageBitmap (#23518) 2024-05-07 04:47:42 -07:00
import_attributes chore: upgrade dlint to 0.60.0 (#24041) 2024-06-05 01:09:29 +02:00
import_maps chore: rough first pass on spec tests (#22877) 2024-03-13 16:21:13 +00:00
info chore: rough first pass on spec tests (#22877) 2024-03-13 16:21:13 +00:00
inspector chore: enable clippy::print_stdout and clippy::print_stderr (#23732) 2024-05-08 22:45:06 -04:00
install chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
jsx feat: add jsx precompile skip element option (#23457) 2024-04-22 17:07:36 +02:00
jupyter chore: move more tests away from itest (#22909) 2024-03-15 15:46:51 -04:00
lint chore: migrate bench, publish, and more itests to spec tests (#23584) 2024-04-29 10:08:27 -04:00
lockfile feat: Deprecate --lock-write flag (#24436) 2024-07-05 04:38:12 +02:00
lsp chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
malformed_config chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
module_graph chore: update references to deno_std to use JSR (#23239) 2024-04-10 17:26:35 -04:00
node chore: fix flaky rejection_handled_web_process (#23817) 2024-05-14 23:51:51 +00:00
npm fix(node): better detection for when to surface node resolution errors (#24653) 2024-07-24 00:22:24 +00:00
package_json feat: npm workspace and better Deno workspace support (#24334) 2024-07-04 00:54:33 +00:00
publish fix(publish): workspace included license file had incorrect path (#24747) 2024-07-26 15:35:29 +00:00
repl chore: bump deno_core (#22596) 2024-02-27 08:05:57 -07:00
run feat(cli): Add --env-file as alternative to --env (#24555) 2024-08-08 06:50:57 -07:00
runtime chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
serve feat(serve): Opt-in parallelism for deno serve (#24920) 2024-08-14 22:26:21 +00:00
subdir FUTURE: remove import assertions support for JavaScript (#23541) 2024-04-29 22:43:05 +02:00
task chore: Fix failing task_npx_non_existent test (#23945) 2024-05-22 18:57:57 +00:00
test chore: update to std@2024.07.19 (#24715) 2024-07-25 15:30:28 +10:00
tls fix(ext/tls): add support EC private key (#23261) 2024-04-08 11:36:34 -06:00
tsc chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
tsc2 chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
type_definitions chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
unfurl feat(publish): support sloppy imports and bare node built-ins (#22588) 2024-02-27 15:13:16 +00:00
vendor feat: deprecate deno vendor (#22183) 2024-07-10 03:18:10 +02:00
webcrypto chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
webgpu fix(ext/webgpu): assign missing constants property of shader about GPUDevice.createRenderPipeline[Async] (#24803) 2024-08-01 11:19:25 -07:00
workers chore: update to std@2024.07.19 (#24715) 2024-07-25 15:30:28 +10:00
allow_run_allowlist_resolution.ts chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
allow_run_allowlist_resolution.ts.out chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
cat.ts feat(lint): deno lint --fix and lsp quick fixes (#22615) 2024-03-21 14:18:59 -07:00
echo.ts chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
echo_server.ts chore: update to std@2024.07.19 (#24715) 2024-07-25 15:30:28 +10:00
env chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
env_unparsable fix: --env flag confusing message on syntax error (#23915) 2024-05-27 15:06:18 +02:00
error_cause_recursive_aggregate.ts chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
error_cause_recursive_aggregate.ts.out chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
error_cause_recursive_tail.ts chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
error_cause_recursive_tail.ts.out chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
navigator_language.ts chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
navigator_languages.ts chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
spawn_kill_permissions.ts chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
symlink_to_subdir chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
welcome.ts chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00