fix(walltime): normalize minimum time only once#127
Conversation
In the local walltime mode results table, the "Time (best)" column divides by `iter_per_round` twice: once in `BenchmarkStats.from_list`, and again in `_print_benchmark_table`. This is only an issue for fast benchmarks: since `iter_per_round` defaults to 1ms, the time for benchmarks taking more than 1ms get divided by 1 twice. Signed-off-by: Luka Peschke <mail@lukapeschke.com>
Greptile SummaryThis PR fixes a double-division bug in the walltime benchmark results table where
Confidence Score: 5/5Safe to merge. The change is a targeted single-line removal of a redundant division that was already performed during stats construction. The fix correctly identifies that BenchmarkStats.from_list already divides all timing values by iter_per_round at line 107, making the downstream division in _print_benchmark_table redundant. For slow benchmarks (iter_per_round == 1) the behavior is identical. For fast benchmarks the displayed value now matches the actual per-iteration time. No other fields in the table were affected by this bug, and no other callers of min_ns perform this extra division. No files require special attention. Important Files Changed
|
In the local walltime mode results table, the "Time (best)" column divides by
iter_per_roundtwice: once inBenchmarkStats.from_list, and again in_print_benchmark_table.This is only an issue for fast benchmarks: since
iter_per_rounddefaults to 1ms, the time for benchmarks taking more than 1ms get divided by 1 twice.MRE
repro.py: