aristocratos / bpytop

Linux/OSX/FreeBSD resource monitor
Apache License 2.0
10.07k stars 397 forks source link

[REQUEST] Minimum scale on network graph #395

Open gsuberland opened 1 year ago

gsuberland commented 1 year ago

Issue #29 (and to a lesser extend #50) asked for a minimum auto scale on the network graph. It looks like both of those tickets were closed with alternative implementations (colour scaling, fixed scale) that met those users' needs, but the actual minimum scale feature does not appear to have been implemented (or at least I couldn't find it).

I would actually like to see a minimum scaling mode on the network graph. The graph being completely flat when <5% of the configured minimum rate is being used is the desired behaviour for me, because I want to look over at the graph and be able to tell whether any notable amount of bandwidth is being used.

My system has a 40Gbps NIC. In auto-scale mode there's not enough dynamic range in the colour to intuitively indicate how much data is being pushed at a glance, and I struggle to keep a mental map of what each colour means anyway. In fixed-scale mode, I'd either need to set the scale below the max link rate, or anything under 250Mbps would be invisible to me. Having the option to specify a minimum but let the scale "overflow" past that when higher speed data transfers are occurring would be great.

In terms of UX, I can see two good approaches:

  1. Add a second bool option called something like "Net limit min scale", which uses the "Net download" and "Net upload" values as the minimum scale when this bool is enabled and "Net auto" is set to true.
  2. Rename "Net auto" to something like "Net autoscale mode", and turn it into an enum with three options, where the first two are the existing fixed and auto behaviours, and the third is the auto behaviour with a fixed minimum specified by the "net download" and "net upload" setting values. The a toggle hotkey would cycle between these.

I'm personally a fan of the second option, since this is essentially a different scaling mode and it allows for swapping between the modes without going into the settings menu.