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 not correct #15

Open
Ladvace opened this issue Mar 2, 2021 · 4 comments
Open

cpu usage not correct #15

Ladvace opened this issue Mar 2, 2021 · 4 comments

Comments

@Ladvace
Copy link

Ladvace commented Mar 2, 2021

I'm using os.cpuUsage as in the example but it doesn't return the right value, it should return somethings bigger than 1, but it never goes above 1%

CPU Usage (%): 0.48840794179306946
 CPU Usage (%): 0.07608901216667718
 CPU Usage (%): 0.027251703231451985
 CPU Usage (%): 0.03877221324717284
CPU Usage (%): 0.05082100268464751
 CPU Usage (%): 0.04029574861367835
CPU Usage (%): 0.02399852316780504
 CPU Usage (%): 0.04997234003319195
 os.cpuUsage((v) => {
    console.log("CPU Usage (%): " + v);
  });
@DexterLandry15
Copy link

os.cpuUsage((v) => {
console.log("CPU Usage (%): " + v * 100);
});

@SunilWang
Copy link

There is no cpuUsage method in the package.

@DexterLandry15
Copy link

There is no cpuUsage method in the package.

But this package created for this

@SunilWang
Copy link

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

3 participants