Skip to content

Fix: Restore decimal precision in summary MHz values - #32

Merged
mintybasil merged 1 commit into
mainfrom
zeroklaw/fix-summary-decimals
May 15, 2026
Merged

Fix: Restore decimal precision in summary MHz values#32
mintybasil merged 1 commit into
mainfrom
zeroklaw/fix-summary-decimals

Conversation

@zeroklaw

Copy link
Copy Markdown
Member

Summary

The benchmark summary table and JSON output were truncating MHz values to whole numbers (e.g., 20 instead of 20.596). This was caused by the BenchSummary struct fields being u32 with explicit as u32 casts in get_bench_summary().

Changes

  • Changed all BenchSummary MHz fields from u32f64 (and Option<u32>Option<f64>)
  • Removed the as u32 truncating casts in both branches of get_bench_summary()

Before

│ Exec Min MHz     │ 18 │
│ Exec Avg MHz     │ 20 │
│ Prove Min MHz    │  1 │

After

│ Exec Min MHz     │ 18.807 │
│ Exec Avg MHz     │ 20.487 │
│ Prove Min MHz    │ 1.874  │

Closes #31

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
zeroklaw force-pushed the zeroklaw/fix-summary-decimals branch from 412893b to 0a82e74 Compare May 14, 2026 21:40
@zeroklaw
zeroklaw marked this pull request as ready for review May 14, 2026 21:49
@zeroklaw
zeroklaw requested a review from mintybasil May 14, 2026 21:49
@mintybasil
mintybasil merged commit d9fd108 into main May 15, 2026
2 checks passed
@mintybasil
mintybasil deleted the zeroklaw/fix-summary-decimals branch May 15, 2026 16:03
@mintybasil
mintybasil restored the zeroklaw/fix-summary-decimals branch June 12, 2026 19:53
@mintybasil
mintybasil deleted the zeroklaw/fix-summary-decimals branch June 16, 2026 20:38
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.

Summary values missing decimals

2 participants