perf(tests): parallelize kokoro periodic perf tests across 3 VMs#4618
perf(tests): parallelize kokoro periodic perf tests across 3 VMs#4618PranjalC100 wants to merge 4 commits intomasterfrom
Conversation
7e20993 to
2b7ffe4
Compare
Summary of ChangesHello, 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 optimizes the periodic performance testing pipeline by moving from a single, sequential execution model to a parallelized approach. By leveraging multiple Kokoro VMs and introducing a routing mechanism in the build script, the overall duration of the performance test suite is significantly reduced. The changes include new configuration files for each test category and improved script robustness with better error handling and execution time tracking. 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. Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4618 +/- ##
==========================================
- Coverage 83.67% 0 -83.68%
==========================================
Files 164 0 -164
Lines 20216 0 -20216
==========================================
- Hits 16916 0 -16916
+ Misses 2663 0 -2663
+ Partials 637 0 -637
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request refactors the performance testing infrastructure by modularizing the build.sh script to support different benchmark types via the BENCHMARK_TYPE environment variable. It introduces specific execution paths for distributed read, distributed write with local tests, and zonal benchmarks, along with corresponding Kokoro configuration files. The feedback focuses on improving test coverage by ensuring that local performance tests are not skipped if distributed benchmarks fail, and removing redundant exit statements that make trailing code unreachable.
| if [ $PERF_BENCHMARKS_FAILED -ne 0 ]; then | ||
| echo "Distributed WRITE benchmarks have failed." | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
This early exit prevents the local performance tests (flat bucket, HNS bucket, and rename benchmarks) from running if the distributed write benchmark fails. In the original script, these tests were independent, and a failure in the distributed part did not block the execution of local tests. To maintain maximum test coverage and visibility into all components, consider removing this check and performing it at the end of the block instead.
| if [ $PERF_BENCHMARKS_FAILED -ne 0 ]; then | |
| echo "Distributed WRITE benchmarks have failed." | |
| exit 1 | |
| fi | |
| # Removed early exit to allow local tests to run even if distributed write fails. |
| print_duration "Rename Benchmark" "$RENAME_START" | ||
| exit 0 |
There was a problem hiding this comment.
The exit 0 here (and at lines 67 and 192) is redundant because bash will naturally skip the remaining elif/else blocks once a condition is met. More importantly, it makes any code following the fi (like the TODO at line 198) unreachable. If you moved the distributed write failure check as suggested earlier, you should place it here.
| print_duration "Rename Benchmark" "$RENAME_START" | |
| exit 0 | |
| print_duration "Rename Benchmark" "$RENAME_START" | |
| if [ $PERF_BENCHMARKS_FAILED -ne 0 ]; then | |
| echo "Distributed WRITE benchmarks have failed." | |
| exit 1 | |
| fi |
|
Hi @meet2mky, @raj-prince, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
4 similar comments
|
Hi @meet2mky, @raj-prince, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
|
Hi @meet2mky, @raj-prince, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
|
Hi @meet2mky, @raj-prince, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
|
Hi @meet2mky, @raj-prince, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
|
Hi @meet2mky, @raj-prince, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
3 similar comments
|
Hi @meet2mky, @raj-prince, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
|
Hi @meet2mky, @raj-prince, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
|
Hi @meet2mky, @raj-prince, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you! |
Description
This change refactors the periodic performance tests to run in parallel across multiple Kokoro VMs, significantly reducing the overall wall-clock execution time.
The monolithic execution in
build.shhas been updated to act as a router based on theBENCHMARK_TYPEenvironment variable. The execution is now split into three concurrent child jobs:Link to the issue in case of a bug fix.
https://b.corp.google.com/issues/502497832
Testing details
Any backward incompatible change? If so, please explain.
No.