-
Notifications
You must be signed in to change notification settings - Fork 168
Bench ranges #1710
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
base: bench
Are you sure you want to change the base?
Bench ranges #1710
Conversation
Summary of ChangesHello @chandra-siri, 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 establishes a robust microbenchmarking suite for Google Cloud Storage read operations. It provides the necessary infrastructure to define, execute, and analyze performance tests under various conditions, including different concurrency models and read access patterns. The framework is designed to be highly configurable and includes tools for detailed resource utilization monitoring and streamlined result reporting, which will be instrumental in identifying performance bottlenecks and optimizing read throughput. 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 introduces benchmarking for read ranges. The changes include adding a num_ranges parameter to benchmark configurations and tests, and updating the download logic to batch range requests. My review has identified a few issues: a potential bug in the benchmark tests where the num_ranges parameter is not correctly propagated, some commented-out code that should be removed, a change in a sample snippet that reduces its functionality, and a potentially unintentional change to the .gitignore file. Please see the detailed comments for suggestions.
| async def download_chunks_using_mrd_async( | ||
| client, filename, other_params, chunks, num_ranges=2 | ||
| ): |
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.
The default value num_ranges=2 is used when num_ranges is not explicitly passed. This is the case for test_downloads_single_proc_multi_coro and test_downloads_multi_proc_multi_coro tests, as the num_ranges parameter from the configuration is not being passed down to this function through its callers (e.g., download_files_using_mrd_multi_coro). This means these tests will always run with num_ranges=2 instead of the values specified in config.yaml, which could lead to misleading benchmark results. The num_ranges parameter should be threaded through the call stack for these tests.
| pylintrc.test | ||
|
|
||
| # Benchmarking results and logs | ||
| __benchmark_results__/** |
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.
| options=( | ||
| # ("grpc.primary_user_agent", "gccl/3.8.1"), | ||
| # ("grpc.experimental.tcp_tx_zerocopy_enabled", True), | ||
| # ("x-goog-api-client", "gl-python-local/3.8.0"), | ||
| ), |
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.
| if __name__ == "__main__": | ||
| list_blobs_with_prefix( | ||
| bucket_name=sys.argv[1], prefix=sys.argv[2], delimiter=sys.argv[3] | ||
| bucket_name=sys.argv[1], prefix=sys.argv[2] |
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 change removes the ability to specify a delimiter from the command line. The previous implementation was brittle as it would crash if the delimiter was not provided. A more robust approach would be to handle the delimiter as an optional argument, which would preserve the functionality of the sample.
| bucket_name=sys.argv[1], prefix=sys.argv[2] | |
| bucket_name=sys.argv[1], prefix=sys.argv[2], delimiter=sys.argv[3] if len(sys.argv) > 3 else None |
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕