mirror of
https://github.com/bcicen/ctop.git
synced 2024-08-30 18:23:19 +00:00
#207 CPU unscaled column changes color according to system total usage
If container uses two cores then CPU column will be always red even if we have dozens of other free cores and CPUS is 1%
This commit is contained in:
parent
f377dcaee2
commit
9a41252764
@ -24,10 +24,10 @@ func NewCpuScaledCol() CompactCol {
|
||||
|
||||
func (w *CPUCol) SetMetrics(m models.Metrics) {
|
||||
val := m.CPUUtil
|
||||
w.BarColor = colorScale(val)
|
||||
if !w.scaleCpu {
|
||||
val = val * int(m.NCpus)
|
||||
}
|
||||
w.BarColor = colorScale(val)
|
||||
w.Label = fmt.Sprintf("%d%%", val)
|
||||
|
||||
if val > 100 {
|
||||
|
Loading…
Reference in New Issue
Block a user