cjbassi / ytop

A TUI system monitor written in Rust
MIT License
2.16k stars 84 forks source link

Only scale by visible network values #93

Open CosmicHorrorDev opened 4 years ago

CosmicHorrorDev commented 4 years ago

Previously the scaling would be based on all network entries recorded instead of just the network entries displayed. This meant that high transmission or reception rates would cause the scaling to drown out any small entries even if the high rates were not being displayed. This change passes in just the amount of samples needed to fill the block and let's the Sparkline calculate the max internally.

Luckily all the hard work seemed to be done already so this change was a joy to make.

Possibly related (#90)