-
-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Numeric table columns in report should be aligned right #975
Comments
Another way to do this would be per table cell. |
If we do this, we also have the option to print the unit in the column title, e.g. "max (ms/s)", and pure numbers in the cells. Although for this perhaps a dedicated csv output is preferable. I have not figured out how to do this in combination with |
https://phpbench.readthedocs.io/en/latest/configuration.html#runner-time-unit
Could do that here:
There is an output for that:
probably this boilds down to be able to configure the individual renderers (e.g. show unit or not, align numbers to the right) |
In a cli report table, to properly compare numbers, columns with numbers should:
\STR_PAD_LEFT
).ms
in one record, butµs
in another record).(for these last points I currently use
--mode=throughput --time-unit=s
as cli parameters)For the first point, I found that the following addition in
TableRenderer::render()
has the desired effect for the main table:However, this is obviously the wrong place to do this.
I am hard-coding the rule that every column except the first two should be aligned right, which is true for the final overview table but not universally for every table.
What the code example shows is that the symfony console table component can align numbers right.
The text was updated successfully, but these errors were encountered: