Conversation
gameknife
commented
Jan 13, 2026
- inspect the build performance
- stopwatch for both config & build
- inspect the build performance - stopwatch for both config & build
Summary of ChangesHello @gameknife, 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 significantly improves the build experience by integrating comprehensive performance monitoring and system diagnostics directly into the build process. By timing configuration and build steps, and logging system hardware details, developers gain better insights into build performance and can more easily identify bottlenecks or inconsistencies across different machines. The changes also contribute to a less cluttered build output by reducing unnecessary verbosity from underlying tools. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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.
Code Review
This pull request introduces valuable build performance metrics and system information logging to the build scripts, which is a great enhancement for monitoring and debugging build times. The changes are well-implemented in both PowerShell and Bash scripts. My feedback includes a few suggestions to improve maintainability and consistency between the scripts, such as simplifying a conditional check in build.ps1 and improving the precision of memory reporting in build.sh.
| if ($Preset -eq "windows-dev" -or $Preset -eq "windows-base") { | ||
| $BuildArgs += @("--", "/verbosity:minimal", "/consoleloggerparameters:Summary") | ||
| } |
There was a problem hiding this comment.
The condition to check the preset can be simplified for better readability and maintainability. Using the -like operator would cover the current presets and any future windows-* presets without needing to modify this line.
if ($Preset -like "windows-*") {
$BuildArgs += @("--", "/verbosity:minimal", "/consoleloggerparameters:Summary")
}
| mem_size=$(sysctl -n hw.memsize) | ||
| mem_size=$((mem_size / 1024 / 1024 / 1024)) | ||
| mem_size="${mem_size}GB" |
There was a problem hiding this comment.
The memory size calculation uses shell integer arithmetic, which truncates the result (e.g., 15.9 GB will be shown as 15 GB). The build.ps1 script rounds the memory to one decimal place for better precision. For consistency, consider using a tool like awk to perform floating-point division.
| mem_size=$(sysctl -n hw.memsize) | |
| mem_size=$((mem_size / 1024 / 1024 / 1024)) | |
| mem_size="${mem_size}GB" | |
| local mem_bytes=$(sysctl -n hw.memsize) | |
| local mem_gb=$(awk -v bytes="$mem_bytes" 'BEGIN { printf "%.1f", bytes / (1024*1024*1024) }') | |
| mem_size="${mem_gb}GB" |
| local mem_kb=$(grep -m1 'MemTotal' /proc/meminfo | awk '{print $2}') | ||
| local mem_gb=$((mem_kb / 1024 / 1024)) | ||
| mem_size="${mem_gb}GB" |
There was a problem hiding this comment.
Similar to the macOS part, this memory calculation uses integer arithmetic, leading to a loss of precision. Using awk for floating-point division would provide more accurate information and be consistent with the PowerShell script.
| local mem_kb=$(grep -m1 'MemTotal' /proc/meminfo | awk '{print $2}') | |
| local mem_gb=$((mem_kb / 1024 / 1024)) | |
| mem_size="${mem_gb}GB" | |
| local mem_kb=$(grep -m1 'MemTotal' /proc/meminfo | awk '{print $2}') | |
| local mem_gb=$(awk -v kb="$mem_kb" 'BEGIN { printf "%.1f", kb / (1024*1024) }') | |
| mem_size="${mem_gb}GB" |
| local mem_bytes=$(wmic ComputerSystem get TotalPhysicalMemory | sed -n '2p' | tr -d '\r') | ||
| local mem_gb=$((mem_bytes / 1024 / 1024 / 1024)) | ||
| mem_size="${mem_gb}GB" |
There was a problem hiding this comment.
For consistency with other platforms and the PowerShell script, this memory calculation should also be updated to use floating-point arithmetic to avoid truncation and provide more precise information.
| local mem_bytes=$(wmic ComputerSystem get TotalPhysicalMemory | sed -n '2p' | tr -d '\r') | |
| local mem_gb=$((mem_bytes / 1024 / 1024 / 1024)) | |
| mem_size="${mem_gb}GB" | |
| local mem_bytes=$(wmic ComputerSystem get TotalPhysicalMemory | sed -n '2p' | tr -d '\r') | |
| local mem_gb=$(awk -v bytes="$mem_bytes" 'BEGIN { printf "%.1f", bytes / (1024*1024*1024) }') | |
| mem_size="${mem_gb}GB" |