Skip to content

benchmarker: Add result history and run metadata to stats panel - #17

Merged
Colton127 merged 1 commit into
mainfrom
claude/benchmarker-stats-panel-1agmt2
Aug 4, 2026
Merged

benchmarker: Add result history and run metadata to stats panel#17
Colton127 merged 1 commit into
mainfrom
claude/benchmarker-stats-panel-1agmt2

Conversation

@Colton127

@Colton127 Colton127 commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

This change adds persistent result history and detailed run metadata to the benchmarker's statistics panel, allowing users to view and compare past benchmark runs without re-running them.

Key Changes

  • New BenchmarkResult class: Encapsulates a complete benchmark run including stats, configuration, timing information, and build mode. Replaces the previous pattern of passing individual parameters.

  • Result history tracking: The BenchmarkController now maintains a list of completed runs (_results) with unique IDs, allowing users to select and compare past results from a dropdown menu.

  • Enhanced StatsPanel UI:

    • Added a Result dropdown showing all completed runs in the session (newest first), with the run in flight listed above recorded ones
    • Added run metadata display showing start/end times, wall-clock duration, and build mode
    • Added a delete button to remove individual results or clear all history
    • Added "Export all results as JSON" option to copy multiple runs at once
    • Improved copy menu with per-option enable/disable states
  • Build mode tracking: Introduced BuildMode enum (debug/profile/release) to track and display the compilation mode, since results are only comparable within the same mode.

  • Report generation updates: Refactored buildJsonReport() and buildTextReport() to accept BenchmarkResult objects instead of individual parameters. Added buildJsonReportList() for exporting multiple results.

  • Controller enhancements:

    • Added selectResult(), deleteResult(), and clearResults() methods for history management
    • Added liveResult property for the run in flight and selectedResult for the UI's displayed result
    • Added statusLabel property that includes worker count for running phases
    • Results are automatically recorded when a run reaches a terminal phase (finished/cancelled/failed)
  • Improved logging: Run numbers and timestamps are now logged, with wall-clock duration reported at completion.

Notable Implementation Details

  • The stats panel follows the live run by default but can be pinned to a historical result via the dropdown
  • A run in flight is not yet recorded, so it cannot be deleted until it completes
  • History is session-only (in-memory); it clears when the app closes
  • Wall-clock duration includes cache preparation time, making it longer than the measured request time
  • The UI gracefully handles empty history and disabled states for buttons when no results exist

Every run that reaches a terminal phase is now recorded as a
BenchmarkResult and stays available from a dropdown at the top of the
statistics panel, newest first, so runs can be compared without
re-running them. The panel follows the run in flight until an older run
is picked. History is kept in memory only.

Each result carries the wall-clock start and end times of the run and
the build mode (debug, profile, release) it was measured in; both are
logged, shown in the panel, and included in the clipboard reports.

The copy button gains a third option that exports every recorded run as
a JSON list, and a clear button beside it deletes the run on show or
clears the whole history.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QEWhgGBcFerXwtUQ9epYGJ
@Colton127 Colton127 changed the title Add result history and run metadata to stats panel benchmarker: Add result history and run metadata to stats panel Aug 4, 2026
@Colton127
Colton127 merged commit bf1f16e into main Aug 4, 2026
2 checks passed
@Colton127
Colton127 deleted the claude/benchmarker-stats-panel-1agmt2 branch August 4, 2026 19:31
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.

2 participants