1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-12 18:42:18 -05:00
denoland-deno/cli/tests/integration
Matt Mastracci 3392a8e530
refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056)
Partially supersedes #19016.

This migrates `spawn` and `spawn_blocking` to `deno_core`, and removes
the requirement for `spawn` tasks to be `Send` given our single-threaded
executor.

While we don't need to technically do anything w/`spawn_blocking`, this
allows us to have a single `JoinHandle` type that works for both cases,
and allows us to more easily experiment with alternative
`spawn_blocking` implementations that do not require tokio (ie: rayon).

Async ops (+~35%):

Before: 

```
time 1310 ms rate 763358
time 1267 ms rate 789265
time 1259 ms rate 794281
time 1266 ms rate 789889
```

After:

```
time 956 ms rate 1046025
time 954 ms rate 1048218
time 924 ms rate 1082251
time 920 ms rate 1086956
```

HTTP serve (+~4.4%):

Before:

```
Running 10s test @ http://localhost:4500
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    68.78us   19.77us   1.43ms   86.84%
    Req/Sec    68.78k     5.00k   73.84k    91.58%
  1381833 requests in 10.10s, 167.36MB read
Requests/sec: 136823.29
Transfer/sec:     16.57MB
```

After:

```
Running 10s test @ http://localhost:4500
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    63.12us   17.43us   1.11ms   85.13%
    Req/Sec    71.82k     3.71k   77.02k    79.21%
  1443195 requests in 10.10s, 174.79MB read
Requests/sec: 142921.99
Transfer/sec:     17.31MB
```

Suggested-By: alice@ryhl.io
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-18 17:05:01 +02:00
..
bench_tests.rs fix(test): disable preventDefault() for beforeunload event (#18911) 2023-05-04 16:19:29 +02:00
bundle_tests.rs feat(cli): --ext parameter for run, compile, and bundle (#17172) 2023-03-22 10:15:53 -04:00
cache_tests.rs fix(ext/cache): cache.put overwrites previous call (#18649) 2023-04-12 11:25:19 +05:30
cert_tests.rs refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056) 2023-05-18 17:05:01 +02:00
check_tests.rs fix(dts): move BroadcastChannel type to lib.deno.unstable.d.ts (#19108) 2023-05-18 17:05:01 +02:00
compile_tests.rs feat(compile): unstable npm and node specifier support (#19005) 2023-05-11 17:26:30 -04:00
coverage_tests.rs fix(test/coverage): exclude test files (#18748) 2023-04-19 23:30:52 +02:00
doc_tests.rs fix(info/doc): add missing --no-lock and --lock flags (#18166) 2023-03-13 17:04:00 -04:00
eval_tests.rs tests: move integration tests to a single module (#17380) 2023-01-13 02:59:13 +01:00
flags_tests.rs tests: move integration tests to a single module (#17380) 2023-01-13 02:59:13 +01:00
fmt_tests.rs feat(cli): flatten deno.json configuaration (#17799) 2023-04-26 23:02:36 -04:00
info_tests.rs fix(info/doc): add missing --no-lock and --lock flags (#18166) 2023-03-13 17:04:00 -04:00
init_tests.rs chore(cli/tests): use test builder in more integration tests (#18031) 2023-03-13 09:40:46 -04:00
inspector_tests.rs refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056) 2023-05-18 17:05:01 +02:00
install_tests.rs tests: move integration tests to a single module (#17380) 2023-01-13 02:59:13 +01:00
js_unit_tests.rs Revert "refactor: don't expose Deno[Deno.internal].core namespace" (#18881) 2023-04-28 00:37:03 +02:00
lint_tests.rs chore: test builders for integration tests (#17965) 2023-02-27 16:52:49 -04:00
lsp_tests.rs fix(dts): move BroadcastChannel type to lib.deno.unstable.d.ts (#19108) 2023-05-18 17:05:01 +02:00
mod.rs refactor: move shared library tests to their own file (#18479) 2023-03-28 13:40:43 -04:00
node_compat_tests.rs tests: cleanup "node_compat_tests" (#18594) 2023-04-05 13:15:57 +02:00
node_unit_tests.rs test(ext/node): add tls_test (#17871) 2023-02-23 12:27:29 +09:00
npm_tests.rs feat(compile): unstable npm and node specifier support (#19005) 2023-05-11 17:26:30 -04:00
repl_tests.rs feat(lsp): ability to configure document pre-load limit (#19097) 2023-05-11 17:26:32 -04:00
run_tests.rs refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056) 2023-05-18 17:05:01 +02:00
shared_library_tests.rs refactor: move shared library tests to their own file (#18479) 2023-03-28 13:40:43 -04:00
task_tests.rs fix(lsp): include all diagnosable documents on initialize (#17979) 2023-03-30 17:47:53 -04:00
test_tests.rs fix(test): disable preventDefault() for beforeunload event (#18911) 2023-05-04 16:19:29 +02:00
upgrade_tests.rs chore: use rustfmt imports_granularity option (#17421) 2023-01-14 23:18:58 -05:00
vendor_tests.rs refactor: make resolver required (#17783) 2023-02-15 11:30:54 -05:00
watcher_tests.rs fix(ext/http): Ensure Deno.serve works across --watch restarts (#18998) 2023-05-11 17:26:26 -04:00
worker_tests.rs tests: move integration tests to a single module (#17380) 2023-01-13 02:59:13 +01:00