Closed dweiller closed 1 year ago
I think alignment of the columns across benchmarks is actually really helpful for viewing...
Could we limit the number of sigfigs shown for numbers so we know the max width of each column at comptime?
I think alignment of the columns across benchmarks is actually really helpful for viewing...
Could we limit the number of sigfigs shown for numbers so we know the max width of each column at comptime?
While I agree it would look nicer, I personally don't find it that helpful, so I would rather leave this to a follow up PR. I think it may not be so easy to pick a static column width, and using one will likely require a strategy for handling number too large to fit as well. For reference the current widths of the mean
and outliers
columns on master are both small enough that I have gotten underflows on some usages.
It would be straightforward to make the columns have the same with by delaying all printing until the end, but I think it's more important to see the results as they are ready.
Looks like the CI ran with a version of zig that is 5 commits too old to include the fmtDuration
changes.
let's try again tomorrow
I believe this was solved by #30
I believe this was solved by #30
For the most part yes. There might be a few things to take/rework from here e.g. if we want the range columns to be aligned to the central character or preventing underflows and making sure columns are aligned when the values get larger than is covered by #30. But given #30 is in I'll wait until I experience these issues before looking at fixing them and open a new PR if/when that happens.
NOTE: This PR depends on ziglang/zig#16093 or an equivalent being merged.
This change aligns the output columns nicely (closes #4, maybe #10):
Note that the columns of different benchmarks are no longer aligned - doing this would require either only printing results after all benchmarks have run, or making the columns wide enough that we can hope/pray the numbers fit inside them (and hence be much wider than needed when number are smaller).
Possible future improvements could be properly centering the 'outliers' and 'delta' headers.