Skip to content

ci(benchmark/react): avoid repeat#1621

Merged
colinaaa merged 1 commit intolynx-family:mainfrom
hzy:p/hzy/bench_1
Aug 28, 2025
Merged

ci(benchmark/react): avoid repeat#1621
colinaaa merged 1 commit intolynx-family:mainfrom
hzy:p/hzy/bench_1

Conversation

@hzy
Copy link
Copy Markdown
Collaborator

@hzy hzy commented Aug 28, 2025

Summary by CodeRabbit

  • Chores
    • Updated performance benchmarking commands to run once and generate trace output files for easier inspection and sharing. This reduces unnecessary repetitions, standardizes output locations and filenames, and simplifies local profiling. The changes improve reproducibility and make it easier to integrate benchmark traces into automation or CI workflows, while maintaining necessary synchronization with the app during benchmark execution.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).
  • Changeset added, and when a BREAKING CHANGE occurs, it needs to be clearly marked (or not required).

Copilot AI review requested due to automatic review settings August 28, 2025 03:32
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Aug 28, 2025

⚠️ No Changeset found

Latest commit: 760338b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Aug 28, 2025

📝 Walkthrough

Walkthrough

Updated perfetto script entries in benchmark/react/package.json to run once per command and write output to specific .ptrace files. Removed --repeat flags, set outputs to dist/001-fib.ptrace and dist/002-hello-reactLynx.ptrace, and retained --wait-for-id=stop-benchmark-true for the 002 script.

Changes

Cohort / File(s) Summary
Benchmark scripts
benchmark/react/package.json
Modified perfetto script commands: removed --repeat; added explicit output paths to dist/*.ptrace; kept --wait-for-id=stop-benchmark-true for 002-hello-reactLynx.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nibbled the scripts with a tidy hop,
One run per trace—then I stop.
Pitter-pat to dist I race,
Dropping .ptrace with careful grace.
Wait-for-id? Still my cue—
A rabbit’s job: precise and true. 🐇✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbit in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbit in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbit gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbit read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbit help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbit ignore or @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbit summary or @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbit or @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the --repeat parameter from benchmark commands to avoid duplication in performance testing. The change simplifies the benchmark execution by removing redundant repeat configurations that may have been causing issues or unnecessary overhead.

  • Removes --repeat=1 from the fibonacci benchmark command
  • Removes --repeat=5 from the ReactLynx hello world benchmark command

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
benchmark/react/package.json (1)

13-14: Ensure dist exists before writing .ptrace files.

If dist/ isn’t present (or build wasn’t run), benchx_cli may fail to open the output path. Create the directory inline to harden the scripts.

Apply this diff:

-    "perfetto:001-fib": "benchx_cli -o dist/001-fib.ptrace run dist/001-fib.lynx.bundle",
-    "perfetto:002-hello-reactLynx": "benchx_cli -o dist/002-hello-reactLynx.ptrace run dist/002-hello-reactLynx.lynx.bundle --wait-for-id=stop-benchmark-true"
+    "perfetto:001-fib": "node -e 'require(\"fs\").mkdirSync(\"dist\",{recursive:true})' && benchx_cli -o dist/001-fib.ptrace run dist/001-fib.lynx.bundle",
+    "perfetto:002-hello-reactLynx": "node -e 'require(\"fs\").mkdirSync(\"dist\",{recursive:true})' && benchx_cli -o dist/002-hello-reactLynx.ptrace run dist/002-hello-reactLynx.lynx.bundle --wait-for-id=stop-benchmark-true"
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 60c81a1 and 760338b.

📒 Files selected for processing (1)
  • benchmark/react/package.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: build / Build (Windows)
  • GitHub Check: build / Build (Ubuntu)
  • GitHub Check: test-rust / Test (Ubuntu)
  • GitHub Check: CodeQL Analyze (actions)
  • GitHub Check: CodeQL Analyze (javascript-typescript)
🔇 Additional comments (2)
benchmark/react/package.json (2)

13-14: LGTM: single-run Perfetto traces with deterministic outputs.

Dropping repeats and writing to fixed .ptrace files will make CI artifacts predictable.


13-14: Confirm the stop-benchmark-true event is emitted by dist/002-hello-reactLynx.lynx.bundle. Otherwise, the perfetto:002 script will hang.

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Aug 28, 2025

CodSpeed Performance Report

Merging #1621 will degrade performances by 41.44%

Comparing hzy:p/hzy/bench_1 (760338b) with main (bc310a8)1

Summary

⚡ 1 improvements
❌ 3 regressions
✅ 15 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
002-hello-reactLynx-commitChanges 123.8 µs 95.9 µs +29.09%
002-hello-reactLynx-hydrate 1.6 ms 1.8 ms -10.33%
002-hello-reactLynx__main-thread-renderOpcodesInto 1.6 ms 2.4 ms -32.77%
002-hello-reactLynx__main-thread-renderToString 1.7 ms 2.9 ms -41.44%

Footnotes

  1. No successful run was found on main (60c81a1) during the generation of this report, so bc310a8 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@relativeci
Copy link
Copy Markdown

relativeci bot commented Aug 28, 2025

Web Explorer

#4661 Bundle Size — 368.23KiB (0%).

760338b(current) vs bc310a8 main#4642(baseline)

Bundle metrics  Change 1 change
                 Current
#4661
     Baseline
#4642
No change  Initial JS 144.31KiB 144.31KiB
No change  Initial CSS 31.84KiB 31.84KiB
No change  Cache Invalidation 0% 0%
No change  Chunks 8 8
No change  Assets 8 8
Change  Modules 221(+0.45%) 220
No change  Duplicate Modules 17 17
No change  Duplicate Code 3.85% 3.85%
No change  Packages 4 4
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#4661
     Baseline
#4642
No change  JS 236.23KiB 236.23KiB
No change  Other 100.16KiB 100.16KiB
No change  CSS 31.84KiB 31.84KiB

Bundle analysis reportBranch hzy:p/hzy/bench_1Project dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci bot commented Aug 28, 2025

React Example

#4668 Bundle Size — 237.06KiB (0%).

760338b(current) vs bc310a8 main#4649(baseline)

Bundle metrics  no changes
                 Current
#4668
     Baseline
#4649
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 4 4
No change  Modules 158 158
No change  Duplicate Modules 64 64
No change  Duplicate Code 45.83% 45.83%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#4668
     Baseline
#4649
No change  IMG 145.76KiB 145.76KiB
No change  Other 91.3KiB 91.3KiB

Bundle analysis reportBranch hzy:p/hzy/bench_1Project dashboard


Generated by RelativeCIDocumentationReport issue

@colinaaa colinaaa merged commit 86da162 into lynx-family:main Aug 28, 2025
43 of 47 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Mar 27, 2026
3 tasks
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.

3 participants