-
Notifications
You must be signed in to change notification settings - Fork 21
feat: Allow logging path to be warmed #307
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
Conversation
Summary of ChangesHello @bnbajwa, 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 introduces a significant enhancement to the logging infrastructure by enabling a "warming" mode. This mode allows the logging code path to be exercised without incurring the overhead of actual log message processing and I/O operations. By introducing a 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 introduces a 'warming' mode for the logging system, which is a good feature for performance-sensitive applications to avoid cold-start latency. The implementation is well-thought-out, especially the throttling mechanism for fake log messages in the AsyncLogger to prevent queue flooding. The changes are consistent across different logger implementations. I've found a couple of minor issues related to code consistency and style that I've detailed in my comments.
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.
Pull Request Overview
This PR introduces a log warming mode feature that allows the logging code paths to be exercised without producing actual log output. This is useful for performance optimization by "warming up" the logging infrastructure (e.g., pre-allocating memory, exercising code paths) before critical operations.
Key Changes
- Added per-thread warming mode control via
set_log_warming_mode()andlog_warming_mode_enabled()functions - Modified all
Loggerimplementations to accept awarming_fakeparameter that suppresses actual log output when enabled - Enhanced
AsyncLoggerto push placeholder entries to the queue during warming mode with rate limiting to maintain queue responsiveness
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| toolbox/sys/Logger.hpp | Added warming mode API functions, updated Logger interface signatures, and added AsyncLogger member variables for tracking fake queue entries |
| toolbox/sys/Logger.cpp | Implemented warming mode functions, updated all logger implementations to handle warming mode, and added AsyncLogger logic to push/track fake entries with rate limiting |
| toolbox/sys/Log.ut.cpp | Updated TestLogger to handle the new warming_fake parameter |
| bench/Log.bm.cpp | Updated FileLogger benchmark to handle the new warming_fake parameter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
SDB-10043
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.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
SDB-10043