Skip to content

Conversation

@ohmayr
Copy link
Contributor

@ohmayr ohmayr commented Dec 4, 2025

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:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@gemini-code-assist
Copy link

Summary of Changes

Hello @ohmayr, 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 primarily focuses on enhancing the code generation process by integrating performance logging and applying consistent code formatting. A new performance tracking decorator has been introduced and applied to critical functions to monitor execution times. Additionally, a new client library configuration for google-cloud-discoveryengine has been added, accompanied by a version update and widespread code reformatting to improve readability and maintainability.

Highlights

  • Performance Logging: Introduced a new performance tracking system in cli.py to measure the execution time of key generation functions.
  • Automated Timing: Applied the @track_time decorator to several critical functions within the code generation process to automatically log their duration.
  • New Client Library Configuration: Added a new generate-request.json file for the google-cloud-discoveryengine library, indicating a new client library generation or significant update.
  • Code Reformatting: Applied extensive code reformatting across the google-cloud-discoveryengine package, including import reordering and line wrapping, likely using ruff.
  • Version Update: Updated the google-cloud-discoveryengine package version to 0.4.0.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a 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 performance logging to the generator CLI, which is a valuable addition for monitoring and optimization. The changes also include extensive stylistic updates across the codebase, likely from an automated tool like ruff, which enhances code consistency. My review focuses on the new performance logging implementation, and I've provided a couple of suggestions to align the new code with Python's style guidelines.


logging.basicConfig(stream=sys.stdout, level=logging.INFO)

import functools

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to PEP 8, imports should be grouped at the top of the file. Please move import functools to the top section with other standard library imports (e.g., after import time).

Comment on lines +68 to 69
return wrapper

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There's a trailing whitespace on line 68 and an unnecessary blank line on line 69. These should be removed for cleaner code.

Suggested change
return wrapper
perf_logger.info(f"{func.__name__:<30} | {duration:.4f} seconds")

@parthea parthea closed this Dec 17, 2025
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