Fix: Restore decimal precision in summary MHz values - #32
Merged
Conversation
Change BenchSummary struct fields from u32 to f64 and remove the explicit casts in get_bench_summary. This was causing fractional MHz values to be truncated to whole numbers in the summary table and JSON output. Closes #31
zeroklaw
force-pushed
the
zeroklaw/fix-summary-decimals
branch
from
May 14, 2026 21:40
412893b to
0a82e74
Compare
zeroklaw
marked this pull request as ready for review
May 14, 2026 21:49
mintybasil
pushed a commit
that referenced
this pull request
Jun 12, 2026
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
The benchmark summary table and JSON output were truncating MHz values to whole numbers (e.g.,
20instead of20.596). This was caused by theBenchSummarystruct fields beingu32with explicitas u32casts inget_bench_summary().Changes
BenchSummaryMHz fields fromu32→f64(andOption<u32>→Option<f64>)as u32truncating casts in both branches ofget_bench_summary()Before
After
Closes #31