Skip to content

[Logs] add SHAMLOGFORMATTER=4 (same as mode 3 but with elapsed time)#1498

Merged
tdavidcl merged 4 commits into
Shamrock-code:mainfrom
tdavidcl:patch-2025-12-28-21-02
Dec 28, 2025
Merged

[Logs] add SHAMLOGFORMATTER=4 (same as mode 3 but with elapsed time)#1498
tdavidcl merged 4 commits into
Shamrock-code:mainfrom
tdavidcl:patch-2025-12-28-21-02

Conversation

@tdavidcl

Copy link
Copy Markdown
Member

No description provided.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @tdavidcl, 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 enhances the logging capabilities by adding a new log format option that displays elapsed time, providing more detailed runtime information. Additionally, it refines the self-gravity calculation logic to ensure it is only active when configured, improving control over simulation parameters.

Highlights

  • New Log Formatter (SHAMLOGFORMATTER=4): Introduced a new log formatter, SHAMLOGFORMATTER=4, which is functionally similar to mode 3 but includes elapsed time in the log output for enhanced debugging and performance monitoring.
  • Self-Gravity Conditional Execution: The self-gravity calculation in Solver.cpp is now conditionally executed, ensuring it only runs when explicitly enabled via solver_config.self_grav_config.is_sg_on().
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.

@github-actions

Copy link
Copy Markdown
Contributor

Thanks @tdavidcl for opening this PR!

You can do multiple things directly here:
1 - Comment pre-commit.ci run to run pre-commit checks.
2 - Comment pre-commit.ci autofix to apply fixes.
3 - Add label autofix.ci to fix authorship & pre-commit for every commit made.
4 - Add label light-ci to only trigger a reduced & faster version of the CI (need the full one before merge).
5 - Add label trigger-ci to create an empty commit to trigger the CI.

Once the workflow completes a message will appear displaying informations related to the run.

Also the PR gets automatically reviewed by gemini, you can:
1 - Comment /gemini review to trigger a review
2 - Comment /gemini summary for a summary
3 - Tag it using @gemini-code-assist either in the PR or in review comments on files

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 new log format style (style 4), which is based on style 3 but adds elapsed time to the full log output. The implementation is sound, and the original comments regarding incorrect Doxygen comments, code duplication, and a minor formatting inconsistency remain valid as they do not contradict any of the provided rules.

Comment thread src/shamsys/src/change_log_format.cpp Outdated
Comment thread src/shamsys/src/change_log_format.cpp
Comment thread src/shamsys/src/change_log_format.cpp Outdated
Comment thread src/shamsys/src/change_log_format.cpp
tdavidcl and others added 2 commits December 28, 2025 21:21
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Workflow report

workflow report corresponding to commit 6cd790e
Commiter email is timothee.davidcleris@proton.me
GitHub page artifact URL GitHub page artifact link (can expire)

Pre-commit check report

Pre-commit check: ✅

trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check for merge conflicts................................................Passed
check that executables have shebangs.....................................Passed
check that scripts with shebangs are executable..........................Passed
check for added large files..............................................Passed
check for case conflicts.................................................Passed
check for broken symlinks................................................Passed
check yaml...............................................................Passed
detect private key.......................................................Passed
No-tabs checker..........................................................Passed
Tabs remover.............................................................Passed
Validate GitHub Workflows................................................Passed
clang-format.............................................................Passed
black....................................................................Passed
ruff check...............................................................Passed
Check doxygen headers....................................................Passed
Check license headers....................................................Passed
Check #pragma once.......................................................Passed
Check SYCL #include......................................................Passed
No ssh in git submodules remote..........................................Passed

Test pipeline can run.

Clang-tidy diff report

No relevant changes found.
Well done!

You should now go back to your normal life and enjoy a hopefully sunny day while waiting for the review.

Doxygen diff with main

Removed warnings : 2
New warnings : 2
Warnings count : 7595 → 7595 (0.0%)

Detailed changes :
- src/shamsys/src/change_log_format.cpp:203: warning: Member SHAMLOGFORMATTER (variable) of file change_log_format.cpp is not documented.
- src/shamsys/src/change_log_format.cpp:206: warning: Member SHAMLOG_ERR_ON_EXCEPT (variable) of file change_log_format.cpp is not documented.
+ src/shamsys/src/change_log_format.cpp:271: warning: Member SHAMLOGFORMATTER (variable) of file change_log_format.cpp is not documented.
+ src/shamsys/src/change_log_format.cpp:274: warning: Member SHAMLOG_ERR_ON_EXCEPT (variable) of file change_log_format.cpp is not documented.

@tdavidcl tdavidcl merged commit a169668 into Shamrock-code:main Dec 28, 2025
60 checks passed
@tdavidcl tdavidcl deleted the patch-2025-12-28-21-02 branch December 28, 2025 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant