-
Notifications
You must be signed in to change notification settings - Fork 20
Show when benchmarks run #83
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
Show when benchmarks run #83
Conversation
📝 WalkthroughWalkthroughAdded a new JSON data file to store benchmark generation metadata including timestamp and RustPython commit information, and updated the benchmarks layout template to render this metadata block with generation time and a link to the commit. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
Summary of ChangesHello @moreal, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly improves the transparency and context of the benchmark results displayed on the website. By introducing a dedicated metadata file and integrating its contents into the benchmark layout, users can now easily identify when the benchmarks were run and against which specific version of RustPython, thereby enhancing the reliability and interpretability of the performance data. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adds a useful feature to display benchmark metadata on the benchmarks page. The implementation is sound, but I have a suggestion to improve the code's maintainability and robustness by using a site-wide variable for the GitHub URL and by adding a check to handle cases where the metadata file might be missing. This will make the code cleaner and more resilient.
| {% assign metadata = site.data["criterion-metadata"] %} | ||
| <div class="text-muted mt-2"> | ||
| <small> | ||
| Generated: {{ metadata.generated_at | date: "%Y-%m-%d %H:%M" }} UTC | ||
| | RustPython commit: <a href="https://github.com/RustPython/RustPython/commit/{{ metadata.rustpython_commit }}">{{ metadata.rustpython_commit | truncate: 7, "" }}</a> | ||
| </small> | ||
| </div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block can be improved for better maintainability and robustness:
- Hardcoded URL: The GitHub commit URL is hardcoded. It's better to use the
site.githubvariable from_config.ymlto make it more maintainable. - Missing Data Check: The code doesn't check if
metadataexists before trying to access its properties. If_data/criterion-metadata.jsonis missing, this will lead to malformed output. It's more robust to wrap the rendering logic in an{% if metadata %}block.
The suggested code below applies both improvements.
{% assign metadata = site.data["criterion-metadata"] %}
{% if metadata %}
<div class="text-muted mt-2">
<small>
Generated: {{ metadata.generated_at | date: "%Y-%m-%d %H:%M" }} UTC
| RustPython commit: <a href="{{ site.github }}commit/{{ metadata.rustpython_commit }}">{{ metadata.rustpython_commit | truncate: 7, "" }}</a>
</small>
</div>
{% endif %}
youknowone
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I manually reviewed the recent benchmark run and upload actions and wrote the metadata file. I also render this metadata on the benchmark page so that it’s possible to identify which commit the results were generated from. It will be displayed as shown below.
https://moreal.github.io/rustpython.github.io/benchmarks

See also RustPython/RustPython#6759
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.