benchmarker: Add result history and run metadata to stats panel - #17
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
BenchmarkResultclass: 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
BenchmarkControllernow maintains a list of completed runs (_results) with unique IDs, allowing users to select and compare past results from a dropdown menu.Enhanced
StatsPanelUI:Resultdropdown showing all completed runs in the session (newest first), with the run in flight listed above recorded onesBuild mode tracking: Introduced
BuildModeenum (debug/profile/release) to track and display the compilation mode, since results are only comparable within the same mode.Report generation updates: Refactored
buildJsonReport()andbuildTextReport()to acceptBenchmarkResultobjects instead of individual parameters. AddedbuildJsonReportList()for exporting multiple results.Controller enhancements:
selectResult(),deleteResult(), andclearResults()methods for history managementliveResultproperty for the run in flight andselectedResultfor the UI's displayed resultstatusLabelproperty that includes worker count for running phasesImproved logging: Run numbers and timestamps are now logged, with wall-clock duration reported at completion.
Notable Implementation Details