Skip to content

Enhance benchmark_rounds.sh with scheduling/orchestration breakdown and verbose logging#336

Open
chenshengxin2026 wants to merge 1 commit intohw-native-sys:mainfrom
chenshengxin2026:benchmark/sh-enhance-v1
Open

Enhance benchmark_rounds.sh with scheduling/orchestration breakdown and verbose logging#336
chenshengxin2026 wants to merge 1 commit intohw-native-sys:mainfrom
chenshengxin2026:benchmark/sh-enhance-v1

Conversation

@chenshengxin2026
Copy link
Contributor

Summary

  • Add per-round scheduling time (sched_startsched_end) and orchestration time (orch_startorch_end) columns to the benchmark report, alongside the existing total elapsed time. Includes avg and trimmed-avg statistics for each breakdown.
  • Add -v/--verbose flag that saves the complete run_example.py console output to a timestamped log file (benchmark_YYYYMMDD_HHMMSS.log), making it easier to diagnose failures or unexpected results.
  • Refactor the awk timing parser to use a new_round() helper for cleaner round-boundary detection based on both sched_seen and orch_seen thread tracking.

Motivation

Previously the benchmark script only reported total elapsed time per round, making it difficult to tell whether latency regressions came from scheduling overhead or orchestration logic. Additionally, when a benchmark run failed, all run_example.py output was discarded (> /dev/null), requiring manual re-runs to debug.

@gemini-code-assist
Copy link

Summary of Changes

Hello, 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 enhances the benchmark_rounds.sh script by providing more granular performance insights and improved debugging capabilities. It addresses previous limitations where only total elapsed time was reported, making it difficult to pinpoint latency regressions to specific phases like scheduling or orchestration. Additionally, it resolves the issue of discarded run_example.py output during benchmark failures by introducing a verbose logging option, which will greatly assist in diagnosing problems.

Highlights

  • Enhanced Benchmark Reporting: Introduced per-round scheduling time and orchestration time columns to the benchmark report, alongside the existing total elapsed time, including average and trimmed-average statistics for each breakdown.
  • Verbose Logging: Added a -v/--verbose flag that saves the complete run_example.py console output to a timestamped log file, making it easier to diagnose failures or unexpected results.
  • Refactored Timing Parser: Refactored the awk timing parser to use a new_round() helper for cleaner round-boundary detection based on both scheduling and orchestration thread tracking.
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.

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 enhances the benchmark script with more detailed timing metrics and verbose logging. The changes are well-structured. I've identified a couple of areas for improvement: one is a minor output formatting issue in the awk script that causes misaligned columns, and the other is an opportunity to refactor some duplicated error-handling logic in the shell script to improve maintainability. My suggestions address these points.

@chenshengxin2026 chenshengxin2026 force-pushed the benchmark/sh-enhance-v1 branch 3 times, most recently from 3a57965 to 75d95c4 Compare March 20, 2026 08:24
…nd verbose logging

Add per-round scheduling and orchestration time columns to the benchmark
report, enabling finer-grained latency analysis. Add a -v/--verbose flag
that captures full run_example.py console output to a timestamped log
file for easier debugging of benchmark failures.
@chenshengxin2026 chenshengxin2026 force-pushed the benchmark/sh-enhance-v1 branch from 75d95c4 to bcf8a6d Compare March 20, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant