-
Notifications
You must be signed in to change notification settings - Fork 3k
observer/etop: Calculate field width with available columns #5557
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
Conversation
956ef0a to
c677716
Compare
lib/observer/src/etop_txt.erl
Outdated
| ++ lists:duplicate(max(InitFunc - 16, 4), $ ) ++ | ||
| "Time" | ||
| ++ lists:duplicate(max(Reds - 4, 4), $ ) ++ | ||
| "Reds" | ||
| ++ lists:duplicate(max(Mem - 5, 3), $ ) ++ | ||
| "Memory" | ||
| ++ lists:duplicate(max(MsgQ - 3, 5), $ ) ++ | ||
| "MsgQ Current Function\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use '$\s' instead of '$ ' so we can see the space.
cc0601b to
2629486
Compare
|
Rebased on master. Should this maybe be rebased on |
Please do |
|
Looks good to me, when you have rebased, squash the commits. |
The field widths are calculated depending on what the underlying io driver reports as max column width. The fields are allowed to use the column width they need if they column budget allows it. The field widths are deducted in priority order and if there is space left the calculated width is used otherwise the default field width is used. If the underlying io driver can't give any column width, the default column width budget of 89 characters is used. This is the legacy hard coded width, plus two spaces between reductions, memory, and msgq fields. Fixes erlang#5080 Signed-off-by: Per Andersson <[email protected]>
2629486 to
1a4bfb2
Compare
|
Squashed and rebased on Thanks for the review! |
The field widths are calculated depending on what the underlying io
driver reports as max column width.
The fields are allowed to use the column width they need if they column
budget allows it. The field widths are deducted in priority order and if
there is space left the calculated width is used otherwise the default
field width is used.
If the underlying io driver can't give any column width, the default
column width budget of 89 characters is used. This is the legacy hard
coded width, plus two spaces between reductions, memory, and msgq
fields.
Fixes #5080
Signed-off-by: Per Andersson [email protected]