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

Fix dhat support for turbo dev #67166

Draft
wants to merge 1 commit into
base: bgw/clean-exit
Choose a base branch
from
Draft

Fix dhat support for turbo dev #67166

wants to merge 1 commit into from

Conversation

bgw
Copy link
Member

@bgw bgw commented Jun 24, 2024

Build next-swc using the dhat feature:

pnpm pack-next --features __internal_dhat-heap

Testing with dev

pnpm dev --turbo

Hit ctrl+c, and see the dhat output:

[dhat]: Teardown profiler
dhat: Total:     10,246,437 bytes in 84,934 blocks
dhat: At t-gmax: 4,129,935 bytes in 42,733 blocks
dhat: At t-end:  4,118,268 bytes in 42,728 blocks
dhat: The data has been saved to dhat-heap.json, and is viewable with dhat/dh_view.html

Check that we didn't regress turbotrace

Modify a project's next.config.mjs to enable turbotrace:

  experimental: {
    turbotrace: {}
  }

run pnpm build and see that we get output from dhat at the end:

dhat: Total:     108,876,305 bytes in 716,123 blocks
dhat: At t-gmax: 53,145,524 bytes in 338,440 blocks
dhat: At t-end:  53,145,524 bytes in 338,440 blocks
dhat: The data has been saved to dhat-heap.json, and is viewable with dhat/dh_view.html

@ijjk ijjk added created-by: Turbopack team PRs by the turbopack team type: next labels Jun 24, 2024
Copy link
Member Author

bgw commented Jun 24, 2024

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @bgw and the rest of your teammates on Graphite Graphite

@bgw bgw changed the title Fix dhat support for turbo dev and build Fix dhat support for turbo dev Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants