Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gauge artifact remains after a column hit >100% #2

Closed
doenietzomoeilijk opened this issue Mar 9, 2017 · 5 comments
Closed

Gauge artifact remains after a column hit >100% #2

doenietzomoeilijk opened this issue Mar 9, 2017 · 5 comments
Milestone

Comments

@doenietzomoeilijk
Copy link

There appears to be a drawing bug, and I'm fairly certain it's in the underlying termui package.

When a containers hits >100% CPU usage, the bar will go red, but when it drops below 100% again, there's one red "pixel" stuck on the right. From a cursory glance at termui, I'd say that percentage should have an extra check for "if it's >100, cap it at 100".

Is this something that should be bumped up to termui, or is it something that can be caught in ctop itself?

ctop-column-glitch

@titpetric
Copy link

titpetric commented Mar 9, 2017

I think the underlying issue is that ctop doesn't normalize CPU use based on cores. I.e. if you have 4 cores, your total cpu usage can go up to 400% (...). It should be trivial to divide this reported number by the number of CPU cores available.

image

This is what illustrates the issue more concisely (not in a gif :)).

@mcampbell
Copy link

Over 100% CPU on multicore system is a common thing to see, so I'm not sure that CPU normalization is the right answer here. But can confirm the bug; after going over 100%, a red pixel is stuck.

2017-03-09_1015

@titpetric
Copy link

@mcampbell for detail view I agree, only the gauge would need to be normalized to a 0-100 scale to not overlap the additional comments. Imho, displaying "144%" is still valid, so this is just a rendering issue.

@mcampbell
Copy link

Yes, 100% (normalized =) agree there; apologies if I misunderstood your intent.

@bcicen bcicen added this to the v0.5 milestone Mar 12, 2017
@bcicen
Copy link
Owner

bcicen commented Mar 15, 2017

Thanks all for the input; maximum gauge percent(drawn) has been capped as part of the latest release.

Feel free to reopen if the issue persists.

@bcicen bcicen closed this as completed Mar 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants