Skip to content

chore: start v8 profiler from bootstrap via PW_PROFILE_DIR - #43054

Merged
Pavel Feldman (pavelfeldman) merged 1 commit into
microsoft:mainfrom
pavelfeldman:pw-profile-dir
Oct 1, 2026
Merged

Pavel Feldman (pavelfeldman) merged 1 commit into
microsoft:mainfrom
pavelfeldman:pw-profile-dir

Conversation

@pavelfeldman

Copy link
Copy Markdown
Member

Summary

  • bootstrap.ts starts the V8 CPU profiler when PW_PROFILE_DIR is set; profiles are named from node args (<script>[-<command>]-<pid>.cpuprofile). Replaces PWTEST_PROFILE_DIR.
  • All process.exit calls go through processExit() from bootstrap, which exits once the profile is written; processExit is lint-restricted like process.exit.
  • coreBundle loads bootstrap as an external module instead of bundling a second copy; CLI entry points, including cli-client, load it first.

- bootstrap.ts starts the V8 CPU profiler when PW_PROFILE_DIR is set and
  writes <script>[-<command>]-<pid>.cpuprofile on exit.
- Replaces PWTEST_PROFILE_DIR and the per-process profiling in the test
  runner, workers and run-server connections.
- All process.exit calls go through processExit() from bootstrap, which
  exits once the profile is written; processExit is lint-restricted like
  process.exit.
- coreBundle loads bootstrap as an external module instead of bundling a
  second copy; CLI entry points, including cli-client, load it first.
@pavelfeldman
Pavel Feldman (pavelfeldman) merged commit c603e4a into microsoft:main Oct 1, 2026
44 checks passed
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

5 flaky ⚠️ [chromium-library] › library/chromium/chromium.spec.ts:179 › serviceWorker(), and fromServiceWorker() work `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:356 › screencast › should work for popups `@chromium-ubuntu-22.04-node24`
⚠️ [chromium-library] › library/popup.spec.ts:260 › should not throw when click closes popup `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:257 › third party 'Partitioned;' cookies `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/browsercontext-cookies-third-party.spec.ts:470 › top level 'Partitioned;' cookie and same origin iframe `@firefox-ubuntu-22.04-node20`

52502 passed, 1270 skipped


Merge workflow run.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

8937 passed, 1489 skipped


Merge workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants