Skip to content

dtest: add optional --max/--min per-hand timing summary#232

Merged
tameware merged 5 commits into
dds-bridge:developfrom
tameware:dtest
Jul 16, 2026
Merged

dtest: add optional --max/--min per-hand timing summary#232
tameware merged 5 commits into
dds-bridge:developfrom
tameware:dtest

Conversation

@tameware

Copy link
Copy Markdown
Collaborator

Report min/max ms-per-hand across batches alongside the existing average, so extremes are in the same units as Avg user/sys time.

Report min/max ms-per-hand across batches alongside the existing average,
so extremes are in the same units as Avg user/sys time.

Co-authored-by: Cursor <cursoragent@cursor.com>

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

Pull request overview

Adds optional reporting of per-hand timing extremes (min/max ms-per-hand) across batches in the dtest test driver, so variability is visible alongside the existing average user/sys timing summary.

Changes:

  • Extend TestTimer to track per-batch per-hand min/max for both user and system timings, and allow print_hands() to write to a caller-provided stream with optional min/max output.
  • Add --min / --max CLI flags and plumb them through OptionsType into the final timing summary output.
  • Add GoogleTest coverage for TestTimer batch tracking and for --min / --max argument parsing.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
library/tests/TestTimer.hpp Adds batch min/max state + new APIs and output options for per-hand reporting.
library/tests/TestTimer.cpp Implements batch recording/min-max tracking and optional min/max printing to a provided stream.
library/tests/testcommon.cpp Passes new --min/--max options into timer.print_hands().
library/tests/test_timer_test.cpp New unit tests for TestTimer::record() min/max behavior and optional reporting.
library/tests/cst.hpp Extends OptionsType with show_min_ / show_max_ flags.
library/tests/BUILD.bazel Adds test_timer_test and args_test Bazel test targets and excludes them from the non-gtest filegroup.
library/tests/args.hpp Updates args module documentation for the new min/max timing options.
library/tests/args.cpp Adds --min / --max parsing and updates token handling to avoid collisions with existing options.
library/tests/args_test.cpp New unit tests verifying --min / --max parsing behavior.

Comment thread library/tests/TestTimer.cpp
Comment thread library/tests/TestTimer.cpp
Comment thread library/tests/args_test.cpp
tameware and others added 3 commits July 13, 2026 16:39
Avoid CWD filename collisions when Bazel sandboxes or parallelizes tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid leaving fixed/setprecision sticky on callers that reuse the stream.

Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid corrupting cumulative averages and min/max when hands is 0 or negative.

Co-authored-by: Cursor <cursoragent@cursor.com>

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Comment thread library/tests/TestTimer.hpp
Comment thread library/tests/TestTimer.cpp
Comment thread library/tests/TestTimer.cpp
Make the dependency explicit instead of relying on transitive includes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tameware tameware self-assigned this Jul 13, 2026
@tameware tameware requested a review from zzcgumn July 13, 2026 23:01
@tameware tameware marked this pull request as ready for review July 15, 2026 14:39

@zzcgumn zzcgumn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense. We want to avoid optimisations that look good on average but only help for the most difficult board and increase the time for most boards.

@tameware tameware merged commit ab5c7b8 into dds-bridge:develop Jul 16, 2026
7 checks passed
@tameware tameware deleted the dtest branch July 16, 2026 22:21
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.

3 participants