Skip to content
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

print_stats table width fix for #2084 #2088

Merged
merged 2 commits into from
May 4, 2022

Conversation

mgor
Copy link
Contributor

@mgor mgor commented May 4, 2022

the width of the print_stats table was increased in a previous PR, which resulted in line wraps in terminal sizes that previously didn't have it (see discussion in #2084).

this PR tries to solve that. in the case of a big terminal window causing STATS_NAME_WIDTH to be at max 80 characters, the table is now 1 character less wide than the original implementation (before #2084), 159 columns vs 158 columns.

this is an comparision of the output of the tables with this PR and the original implementation with a 119 column wide terminal:
image

the original implementation would allow a request name of maximum 34 characters in the DELETE request type case, and 37 characters in the GET request type case.

with the new implementation, the maximum request name length, with 119 columns, would always be 32 characters.

@mgor
Copy link
Contributor Author

mgor commented May 4, 2022

@cyberw, i have another commit (not pushed), that would give an additional 4 characters in request name (totalting to a maximum request name at a fixed 36 characters in a 119 column wide terminal), by "compacting"[0] some other columns, and changing Median to its abbrevation Med.

[0] affects when Avg or Med gets maximum values of 7 figures

by compacting other columns, and changing `Median` header to `Med`.
@cyberw
Copy link
Collaborator

cyberw commented May 4, 2022

LGTM (this time I tested it properly with my setup :P )

I think compacting the response time columns as you suggested makes sense. Response times in excess of 100 seconds is kind of rare (at least more rare than request names longer than 32 characters)

Please push it here, and if it looks good I'll merge it as one PR.

@mgor
Copy link
Contributor Author

mgor commented May 4, 2022

great! here comes an additional 4 characters for request name :)

@cyberw
Copy link
Collaborator

cyberw commented May 4, 2022

Nice! Thanks!

@cyberw cyberw merged commit d41aa1f into locustio:master May 4, 2022
@mgor mgor deleted the bug/ascii_table_width branch May 4, 2022 12:23
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.

2 participants