Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@avtobiff
Copy link
Contributor

@avtobiff avtobiff commented Dec 29, 2021

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]

@CLAassistant
Copy link

CLAassistant commented Dec 29, 2021

CLA assistant check
All committers have signed the CLA.

@avtobiff avtobiff force-pushed the etop-dynamic-width branch 3 times, most recently from 956ef0a to c677716 Compare December 31, 2021 10:19
@rickard-green rickard-green added the team:PS Assigned to OTP team PS label Jan 3, 2022
Comment on lines 179 to 190
++ 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",
Copy link
Contributor

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.

@avtobiff
Copy link
Contributor Author

Rebased on master.

Should this maybe be rebased on maint instead and be backported?

@dgud
Copy link
Contributor

dgud commented Jan 18, 2022

Rebased on master.
Should this maybe be rebased on maint instead and be backported?

Please do

@dgud
Copy link
Contributor

dgud commented Jan 20, 2022

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]>
@avtobiff
Copy link
Contributor Author

Squashed and rebased on maint.

Thanks for the review!

@avtobiff avtobiff changed the base branch from master to maint January 20, 2022 12:56
@dgud dgud added the testing currently being tested, tag is used by OTP internal CI label Jan 21, 2022
@dgud dgud merged commit 32ac4b1 into erlang:maint Jan 21, 2022
@avtobiff avtobiff deleted the etop-dynamic-width branch January 21, 2022 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

etop limited terminal width cause column value truncation

4 participants