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

CPU usage is 0% accross all processors in example #128

Closed
ethanhs opened this issue Aug 8, 2018 · 7 comments
Closed

CPU usage is 0% accross all processors in example #128

ethanhs opened this issue Aug 8, 2018 · 7 comments

Comments

@ethanhs
Copy link
Contributor

ethanhs commented Aug 8, 2018

Hi!

I was trying to run the sample, and it reported that all processors where at 0% usage, even when they were not. What is strange is that your process viewer shows some activity, while the sample does not. Any idea why?

@GuillaumeGomez
Copy link
Owner

I'll need information like what OS you're running on.

@ethanhs
Copy link
Contributor Author

ethanhs commented Aug 9, 2018

Oh sure, this is on Ubuntu 18.04 x64.

@GuillaumeGomez
Copy link
Owner

Ok, now I got your issue. In order to compute the CPU usage (on linux at least), I need two sets of information. You get a new one every time you use the refresh method. Refresh at least twice and you should have the CPU usage.

@ethanhs
Copy link
Contributor Author

ethanhs commented Aug 9, 2018

Aha! Thanks for the information. That is good to know (and makes a lot of sense). Perhaps this should be documented somewhere?

@GuillaumeGomez
Copy link
Owner

It'd be wonderful! Interested into sending a pull request? ;)

@ethanhs
Copy link
Contributor Author

ethanhs commented Aug 9, 2018

I opened #129

@GuillaumeGomez
Copy link
Owner

I suppose it can be closed now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants