fix(benchmarks): widen the comparative label column so long Jasper rows align#198
Merged
Conversation
…ws align The library column was %-24s, but "JasperReports (1000 rows)" is 25 chars, so it overran the field and shoved that row's separators out of alignment. Widen the header and data-row format to %-26s (row width is now 60, matching the existing separator) so every label fits.
…t label Replace the fixed label-column width with one computed from the widest label a row can print, so a longer label (a bigger sweep size) can no longer overflow the column and misalign the table. Build the header/row formats and the rule widths from it, and size the scaling-summary rule to its actual content width (it was 2 chars too wide).
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.
Why
The comparative benchmark's console report uses a fixed-width label column. Long scenario labels — e.g.
JasperReports (1000 rows)(24 chars) — filled the%-24sfield exactly, so the|separator and the time/heap columns no longer lined up.What changed
Widen the label column from
%-24sto%-26sinComparativeBenchmark.printTableHeaderand the per-row print, so the longest scenario label keeps a gap before the separator and all 12 rows align.Verification
Re-ran the comparative benchmark; the printed table's columns align for every row, including the 1000-row Jasper line.