bmr-cymru / dmioscope

Device-mapper IO visualisation tools
GNU General Public License v2.0
5 stars 1 forks source link

dmioscope: implement sparklines / blinkenlights output #11

Open bmr-cymru opened 7 years ago

bmr-cymru commented 7 years ago

Unicode characters allow a compact representation of simple bar-graph like figures:

Numbers separated by space/commas: 1 2 3 4 5 6 7 8 7 6 5 4 3 2 1
min: 1.000000; max: 7.000000
▁▂▃▄▅▆▇█▇▆▅▄▃▂▁

See rossettacode for more details.

This would allow a multi-device display using one row per device (25-50 devices/screen roughly).

It's fairly easy to support for fixed-width bins and similarly sized devices; adaptive bins, or widely varying device sizes are a bit more complex as each row needs to be scaled independently to make full use of the display width. This means that there isn't a clear character-to-space relationship for the entire output as a whole.