Skip to content

Conversation

@bnbajwa
Copy link
Contributor

@bnbajwa bnbajwa commented Nov 12, 2025

SDB-10043

@bnbajwa bnbajwa requested a review from a team as a code owner November 12, 2025 18:40
@gemini-code-assist
Copy link

Summary of Changes

Hello @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 warming_fake flag, various logger implementations can conditionally skip expensive operations, making it ideal for performance benchmarking, system initialization, or stress testing where the logging mechanism needs to be active but its side effects temporarily suppressed.

Highlights

  • Logging Warming Mode: Introduced a new "warming" mode for the logging system, allowing log calls to execute without performing actual I/O operations.
  • warming_fake Parameter: Added a bool warming_fake parameter to the do_write_log methods across various logger implementations to control the fake logging behavior.
  • Per-Thread Control: Implemented set_log_warming_mode and log_warming_mode_enabled functions, utilizing a thread_local variable, to manage the warming mode on a per-thread basis.
  • AsyncLogger Enhancements: The AsyncLogger now handles "fake" log entries by pushing nullptr to its internal queue, with rate limiting to prevent flooding, and correctly accounts for these fake entries during processing.
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 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.

Copy link

Copilot AI left a 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() and log_warming_mode_enabled() functions
  • Modified all Logger implementations to accept a warming_fake parameter that suppresses actual log output when enabled
  • Enhanced AsyncLogger to 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.

Copy link

Copilot AI left a 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.

@bnbajwa bnbajwa enabled auto-merge (rebase) November 13, 2025 14:16
@bnbajwa bnbajwa disabled auto-merge November 13, 2025 14:16
@bnbajwa bnbajwa enabled auto-merge (rebase) November 13, 2025 14:16
@bnbajwa bnbajwa merged commit d16b449 into reactivemarkets:master Nov 13, 2025
11 checks passed
@bnbajwa bnbajwa deleted the log branch November 13, 2025 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants