-
-
Notifications
You must be signed in to change notification settings - Fork 424
chore: improve benchmark #8664
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
chore: improve benchmark #8664
Conversation
Summary of ChangesHello @twoeths, 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 focuses on improving the efficiency and relevance of the project's benchmark suite. By strategically removing outdated or non-critical tests and optimizing test configurations, the changes aim to reduce overall benchmark execution time, mitigate Out-Of-Memory errors, and ensure that the remaining benchmarks accurately reflect current production performance concerns. Highlights
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 focuses on improving the performance and relevance of the benchmark suite. The changes effectively reduce benchmark execution time by removing fixed minimum run times (minMs), skipping slower or less relevant test suites, and removing a benchmark file that is no longer needed. Additionally, a minor but useful optimization is included to avoid an unnecessary array copy. The changes are well-aligned with the goal of making the benchmarks faster and more focused. I have one minor suggestion to fix a typo in a comment for better clarity.
Performance Report✔️ no performance regression detected Full benchmark results
|
|
benchmark execution time was cut down from ~50m to ~13m |
| ✔ toHexString serialized data 727592.3 ops/s 1.374396 us/op - 6916 runs 10.0 s | ||
| ✔ Buffer.toString(base64) 2570800 ops/s 388.9840 ns/op - 24628 runs 10.1 s | ||
| */ | ||
| describe("computeSigningRoot", () => { |
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.
why was this removed instead of just skipped?
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.
as I remember computeSigningRoot() was the bottle neck when we verify attestations
things changed completely since we switch to verifying attestations in batch
it was more about knowing how much does it cause than maintaining its performance over time since the performance implementation is very simple
for clone() and Buffer.from(bytes).toString("base64");: it is what it is, there is nothing to improve there, we also don't want to manage benchmark for them.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #8664 +/- ##
=========================================
Coverage 52.02% 52.02%
=========================================
Files 848 848
Lines 65837 65837
Branches 4811 4811
=========================================
Hits 34250 34250
Misses 31518 31518
Partials 69 69 🚀 New features to boost your workflow:
|
|
🎉 This PR is included in v1.38.0 🎉 |
Motivation
Description
this is based on the long running test I found in https://github.com/ChainSafe/lodestar/actions/runs/19874295397/job/56957698411