Tomas-M / iotop

A top utility for IO
Other
391 stars 51 forks source link

Process graphs don't animate properly when using --ascii #57

Closed rbanffy closed 1 year ago

rbanffy commented 1 year ago

When using the --ascii option, the per-process graphs appear to be trying to express two values per character cell, unlike the graphs on top, which express one value per cell when not in unicode. This is observable in the master branch.

Screencast from 2023-08-29 23-30-34.webm

bbonev commented 1 year ago

I can confirm that this is not the intended behavior - looks like only the even positions are displayed.

Will look into that and update here...

rbanffy commented 1 year ago

I was thinking of simplifying the view_curses function and introduce a history_to_graph that'd take a graphstr, its length (so we can use strncat, and know the size in character cells), the character set to be used (which is why this all started, after all :-) ), a number of data points per cell (1 or 2, because Braille, 2x2, 2x3 and ITU T.100 "smoothed mosaics" can do 2 per column) the xxxid_stats_arr struct, and an enum telling which stat from the xxxid_stats structs is to be rendered.

bbonev commented 1 year ago

Yes, view_curses can benefit from some refactoring...