-
Notifications
You must be signed in to change notification settings - Fork 455
add test log #1161
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: main
Are you sure you want to change the base?
add test log #1161
Conversation
Summary of ChangesHello @ascend-direct-dev, 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 observability of the data transfer process by integrating additional informational log statements at critical stages. These new logs will provide clearer insights into when transfer batches are submitted, queued, and executed, which will be invaluable for debugging and monitoring the flow of data within the system. 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 adds several LOG(INFO) statements across different files. Based on the PR title 'add test log' and the content of the logs (e.g., including process IDs), these appear to be for debugging purposes. While useful for development, LOG(INFO) statements can create a lot of noise in production logs. It is recommended to convert these to verbose logs using VLOG(1), which is already in use in the codebase. This allows the logs to be enabled for debugging without affecting production environments.
| LOG(INFO) << "Submitting transfer batch " << batch_id | ||
| << " pid:" << getpid(); |
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 LOG(INFO) statement appears to be for debugging, as suggested by the PR title. To avoid cluttering production logs, it's better to use verbose logging. Consider changing this to VLOG(1), which allows these logs to be enabled only when needed for debugging.
| LOG(INFO) << "Submitting transfer batch " << batch_id | |
| << " pid:" << getpid(); | |
| VLOG(1) << "Submitting transfer batch " << batch_id | |
| << " pid:" << getpid(); |
| slice_list.push_back(slice); | ||
| } | ||
|
|
||
| LOG(INFO) << "Push batch id:" << batch_id << " to slice queue"; |
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 LOG(INFO) statement seems to be for debugging purposes. To prevent noisy logs in production, please use a verbose logging level like VLOG(1). This will allow you to enable these logs on demand for debugging without affecting the default log output.
| LOG(INFO) << "Push batch id:" << batch_id << " to slice queue"; | |
| VLOG(1) << "Push batch id:" << batch_id << " to slice queue"; |
| LOG(INFO) << "Start transfer to " << target_adxl_engine_name | ||
| << " pid:" << getpid(); |
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 inclusion of the process ID (pid) in this log message strongly suggests it's intended for debugging. LOG(INFO) should be reserved for information that is generally useful. For debugging-specific logs, please use VLOG(1) to keep production logs clean.
| LOG(INFO) << "Start transfer to " << target_adxl_engine_name | |
| << " pid:" << getpid(); | |
| VLOG(1) << "Start transfer to " << target_adxl_engine_name | |
| << " pid:" << getpid(); |
| op_desc.len = slice->length; | ||
| op_descs.emplace_back(op_desc); | ||
| } | ||
| LOG(INFO) << "Start call TransferSync to " << target_adxl_engine_name; |
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 LOG(INFO) statement appears to be a debug log for tracing execution flow. It's recommended to use verbose logging, such as VLOG(1), for this kind of message. This helps in keeping the production logs concise and focused on important events.
| LOG(INFO) << "Start call TransferSync to " << target_adxl_engine_name; | |
| VLOG(1) << "Start call TransferSync to " << target_adxl_engine_name; |
Description
Type of Change
How Has This Been Tested?
Checklist