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

bench: add sozo build bench for spawn and move #2419

Merged
merged 2 commits into from
Sep 16, 2024

Conversation

glihm
Copy link
Collaborator

@glihm glihm commented Sep 12, 2024

Criterion enforcing at least 10 iterations, it's not very suitable in this scenario.

As a workaround, we output the same bencher format for the single build run (which might add 1 extra build at some point) to ensure compatibility with the current CI action.

Summary by CodeRabbit

  • New Features

    • Introduced a dedicated benchmarking job in the GitHub Actions workflow for enhanced performance monitoring.
    • Added a new benchmark configuration for the sozo project, allowing for performance testing.
    • Implemented a benchmarking utility for compiling projects within the Dojo framework.
  • Documentation

    • Created a new file containing benchmark metrics for performance evaluation.

@glihm glihm requested a review from kariy September 12, 2024 16:58
Copy link

coderabbitai bot commented Sep 12, 2024

Walkthrough

Ohayo, sensei! This pull request introduces a new benchmarking job named bench-sozo to the GitHub Actions workflow, along with a corresponding benchmark configuration in the Cargo.toml file for the sozo project. It includes a new benchmarking utility in spawn-and-move-build.rs for performance measurement and a file sozo_build_benchmark.txt that records a benchmark metric. These changes facilitate performance testing and monitoring within the project.

Changes

File Change Summary
.github/workflows/bench.yml Added a new job bench-sozo for benchmarking using Docker and GitHub Actions.
bin/sozo/Cargo.toml Added a benchmark section [[bench]] with harness = false for spawn-and-move-build.
bin/sozo/benches/spawn-and-move-build.rs Introduced a benchmarking utility to compile a project and measure performance.
bin/sozo/sozo_build_benchmark.txt Added a file containing a benchmark metric value 26102.

Possibly related PRs

  • refactor(dojo-lang): output debug info conditionally #2411: The changes in this PR involve modifications to the DojoCompiler struct and its instantiation, which may indirectly relate to the benchmarking process by affecting how the compiler behaves during performance tests, although it does not directly alter the benchmarking functionality itself.

Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between cbc4e15 and dd3b109.

Files selected for processing (1)
  • .github/workflows/bench.yml (1 hunks)
Files skipped from review due to trivial changes (1)
  • .github/workflows/bench.yml

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>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai 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:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

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

Documentation and Community

  • 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

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.91%. Comparing base (80d1827) to head (dd3b109).
Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2419      +/-   ##
==========================================
- Coverage   67.92%   67.91%   -0.01%     
==========================================
  Files         364      364              
  Lines       47760    47832      +72     
==========================================
+ Hits        32440    32486      +46     
- Misses      15320    15346      +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@glihm glihm merged commit 2d6e5de into dojoengine:main Sep 16, 2024
15 checks passed
@kariy kariy mentioned this pull request Sep 19, 2024
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