Skip to content

feat(debug): emit SessionPreface to meta.json#4205

Closed
hyf0 wants to merge 1 commit intomainfrom
04-19-feat_debug_emit_sessionpreface_to_meta.json_
Closed

feat(debug): emit SessionPreface to meta.json#4205
hyf0 wants to merge 1 commit intomainfrom
04-19-feat_debug_emit_sessionpreface_to_meta.json_

Conversation

@hyf0
Copy link
Member

@hyf0 hyf0 commented Apr 19, 2025

Description

image

Closes #4134.

Copy link
Member Author

hyf0 commented Apr 19, 2025

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

@netlify
Copy link

netlify bot commented Apr 19, 2025

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 22b0448
🔍 Latest deploy log https://app.netlify.com/sites/rolldown-rs/deploys/68034f08cae6cd000808fbc7

@hyf0 hyf0 force-pushed the 04-19-feat_debug_emit_sessionpreface_to_meta.json_ branch from 7a064a3 to 03b7ede Compare April 19, 2025 06:50
@github-actions
Copy link
Contributor

github-actions bot commented Apr 19, 2025

Benchmarks Rust

  • target: main(76ba8e5)
  • pr: 04-19-feat_debug_emit_sessionpreface_to_meta.json_(22b0448)
group                                                               pr                                     target
-----                                                               --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol                     1.01     73.5±0.99ms        ? ?/sec    1.00     73.1±0.75ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-minify              1.01     94.0±1.33ms        ? ?/sec    1.00     93.2±1.02ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-minify-sourcemap    1.01    107.4±1.79ms        ? ?/sec    1.00    105.9±0.88ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap           1.00     83.6±1.13ms        ? ?/sec    1.00     83.5±2.16ms        ? ?/sec
bundle/bundle@rome-ts                                               1.00    123.4±1.59ms        ? ?/sec    1.01    124.2±2.23ms        ? ?/sec
bundle/bundle@rome-ts-minify                                        1.00    198.8±1.61ms        ? ?/sec    1.00    199.2±1.80ms        ? ?/sec
bundle/bundle@rome-ts-minify-sourcemap                              1.00    238.5±2.47ms        ? ?/sec    1.01    241.3±3.79ms        ? ?/sec
bundle/bundle@rome-ts-sourcemap                                     1.00    136.8±1.39ms        ? ?/sec    1.00    136.4±1.94ms        ? ?/sec
bundle/bundle@threejs                                               1.02     42.4±0.78ms        ? ?/sec    1.00     41.5±1.24ms        ? ?/sec
bundle/bundle@threejs-minify                                        1.00     85.6±0.70ms        ? ?/sec    1.00     85.2±0.38ms        ? ?/sec
bundle/bundle@threejs-minify-sourcemap                              1.00    100.0±0.83ms        ? ?/sec    1.01    101.1±1.03ms        ? ?/sec
bundle/bundle@threejs-sourcemap                                     1.03     49.7±1.10ms        ? ?/sec    1.00     48.5±0.79ms        ? ?/sec
bundle/bundle@threejs10x                                            1.00    427.6±5.00ms        ? ?/sec    1.00    429.7±6.30ms        ? ?/sec
bundle/bundle@threejs10x-minify                                     1.00  1049.6±10.09ms        ? ?/sec    1.00   1046.4±4.84ms        ? ?/sec
bundle/bundle@threejs10x-minify-sourcemap                           1.00   1228.2±6.56ms        ? ?/sec    1.00   1223.5±6.42ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                                  1.00    500.9±3.83ms        ? ?/sec    1.00    502.3±5.29ms        ? ?/sec
remapping/remapping                                                 1.00     27.2±1.29ms        ? ?/sec    1.00     27.1±1.40ms        ? ?/sec
remapping/render-chunk-remapping                                    1.09     71.2±5.52ms        ? ?/sec    1.00     65.4±2.90ms        ? ?/sec
scan/scan@rome-ts                                                   1.00     94.7±0.87ms        ? ?/sec    1.01     95.6±1.34ms        ? ?/sec
scan/scan@threejs                                                   1.00     31.9±0.96ms        ? ?/sec    1.02     32.5±2.03ms        ? ?/sec
scan/scan@threejs10x                                                1.00    316.2±2.95ms        ? ?/sec    1.01    319.3±5.27ms        ? ?/sec

@hyf0 hyf0 force-pushed the 04-19-feat_debug_emit_sessionpreface_to_meta.json_ branch from 03b7ede to 22b0448 Compare April 19, 2025 07:21
let file_emitter = Arc::new(FileEmitter::new(Arc::clone(&options)));

apply_inner_plugins(&mut self.plugins);
trace_action!(
Copy link
Member Author

@hyf0 hyf0 Apr 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is blocked by that a rust bunder instance would be created twice while using CLI, which causes generating two SessionPreface event with different SessionId. And I don't find a way good way to deal with this.

Currently the only data that's closed to SesstionId is the memory address of RolldownBuild instance in nodejs.

@underfin @IWANABETHATGUY cc

github-merge-queue bot pushed a commit that referenced this pull request Jun 26, 2025
- Closes #4134.
- Closes #4205.

Overview
```
{"timestamp":1750921704146,"action":"SessionMeta","inputs":[{"name":"entry","import":"./index.ts"}],"plugins":[{"name":"builtin:oxc-runtime","index":0},{"name":"builtin:data-uri","index":1}],"cwd":".../rolldown/examples/basic-typescript","platform":"browser","format":"esm","dir":null,"file":null,"build_id":"bid_0_count_1","session_id":"sid_0_1750921704070"}

```
@hyf0 hyf0 closed this in #5075 Jun 26, 2025
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.

[Feature Request][DevTools]: Build meta information in .rolldown/[build-id]/meta.json

2 participants