Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NodeProcessPool: implement debug mode for a single-process passing --inspect-brk #3385

Merged
merged 4 commits into from Jan 20, 2023

Conversation

wbinnssmith
Copy link
Member

This implements a debug mode for spawning Node processes across multiple surfaces including evaluate and get_renderer_pool.

It:

  • automatically limits concurrency to 1 process per pool
  • passes --inspect-brk to spawned Node process
  • sets the timeout to effectively-infinite duration

Test Plan: set the value to true for the call to get_renderer_pool in render_static.rs and attached to a debuggable server renderer process.

@wbinnssmith wbinnssmith requested a review from a team as a code owner January 19, 2023 23:20
@vercel
Copy link

vercel bot commented Jan 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
examples-designsystem-docs 🔄 Building (Inspect) Jan 20, 2023 at 1:11AM (UTC)
examples-svelte-web 🔄 Building (Inspect) Jan 20, 2023 at 1:11AM (UTC)
8 Ignored Deployments
Name Status Preview Comments Updated
examples-basic-web ⬜️ Ignored (Inspect) Jan 20, 2023 at 1:11AM (UTC)
examples-cra-web ⬜️ Ignored (Inspect) Jan 20, 2023 at 1:11AM (UTC)
examples-kitchensink-blog ⬜️ Ignored (Inspect) Jan 20, 2023 at 1:11AM (UTC)
examples-native-web ⬜️ Ignored (Inspect) Jan 20, 2023 at 1:11AM (UTC)
examples-nonmonorepo ⬜️ Ignored (Inspect) Jan 20, 2023 at 1:11AM (UTC)
examples-tailwind-web ⬜️ Ignored (Inspect) Jan 20, 2023 at 1:11AM (UTC)
turbo-site ⬜️ Ignored (Inspect) Visit Preview Jan 20, 2023 at 1:11AM (UTC)
turbo-vite-web ⬜️ Ignored (Inspect) Jan 20, 2023 at 1:11AM (UTC)

@github-actions
Copy link
Contributor

github-actions bot commented Jan 19, 2023

🟢 CI successful 🟢

Thanks

@wbinnssmith wbinnssmith added the pr: automerge Kodiak will merge these automatically after checks pass label Jan 19, 2023
@kodiakhq kodiakhq bot merged commit 8df9430 into main Jan 20, 2023
@kodiakhq kodiakhq bot deleted the wbinnssmith/node-js-debug branch January 20, 2023 01:58
@github-actions
Copy link
Contributor

Benchmark for 02c5e1c

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 8841.09µs ± 35.27µs 8888.63µs ± 58.92µs +0.54%
bench_hmr_to_commit/Turbopack RCC/1000 modules 9140.11µs ± 65.06µs 9069.98µs ± 109.93µs -0.77%
bench_hmr_to_commit/Turbopack RSC/1000 modules 462.84ms ± 1.34ms 461.42ms ± 1.83ms -0.31%
bench_hmr_to_commit/Turbopack SSR/1000 modules 8916.24µs ± 65.96µs 8949.55µs ± 69.07µs +0.37%
bench_hmr_to_eval/Turbopack CSR/1000 modules 7803.26µs ± 45.53µs 7799.91µs ± 49.58µs -0.04%
bench_hmr_to_eval/Turbopack RCC/1000 modules 7975.07µs ± 53.07µs 7989.51µs ± 54.14µs +0.18%
bench_hmr_to_eval/Turbopack SSR/1000 modules 7906.54µs ± 46.25µs 7864.63µs ± 77.85µs -0.53%
bench_hydration/Turbopack RCC/1000 modules 3346.49ms ± 10.75ms 3368.19ms ± 12.81ms +0.65%
bench_hydration/Turbopack RSC/1000 modules 2847.27ms ± 11.62ms 2865.61ms ± 12.07ms +0.64%
bench_hydration/Turbopack SSR/1000 modules 2673.88ms ± 9.78ms 2678.16ms ± 7.67ms +0.16%
bench_startup/Turbopack CSR/1000 modules 1661.90ms ± 4.87ms 1660.63ms ± 5.11ms -0.08%
bench_startup/Turbopack RCC/1000 modules 2517.52ms ± 5.84ms 2524.53ms ± 6.86ms +0.28%
bench_startup/Turbopack RSC/1000 modules 2403.48ms ± 10.32ms 2419.77ms ± 7.18ms +0.68%
bench_startup/Turbopack SSR/1000 modules 2076.80ms ± 3.32ms 2081.76ms ± 5.64ms +0.24%

jridgewell pushed a commit to vercel/next.js that referenced this pull request Mar 10, 2023
…inspect-brk (vercel/turbo#3385)

This implements a debug mode for spawning Node processes across multiple surfaces including `evaluate` and `get_renderer_pool`.

It:

* automatically limits concurrency to 1 process per pool
* passes `--inspect-brk` to spawned Node process
* sets the timeout to effectively-infinite duration

Test Plan: set the value to true for the call to `get_renderer_pool` in render_static.rs and attached to a debuggable server renderer process.
sokra pushed a commit to vercel/next.js that referenced this pull request Mar 13, 2023
…inspect-brk (vercel/turbo#3385)

This implements a debug mode for spawning Node processes across multiple surfaces including `evaluate` and `get_renderer_pool`.

It:

* automatically limits concurrency to 1 process per pool
* passes `--inspect-brk` to spawned Node process
* sets the timeout to effectively-infinite duration

Test Plan: set the value to true for the call to `get_renderer_pool` in render_static.rs and attached to a debuggable server renderer process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: automerge Kodiak will merge these automatically after checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants