Skip to content

Increased precision of the CPU utilization value#102

Merged
Kyome22 merged 3 commits into
runcat-dev:masterfrom
airtaxi:cpu
Jul 19, 2022
Merged

Increased precision of the CPU utilization value#102
Kyome22 merged 3 commits into
runcat-dev:masterfrom
airtaxi:cpu

Conversation

@airtaxi
Copy link
Copy Markdown
Contributor

@airtaxi airtaxi commented Jul 11, 2022

Applied new PerformanceCounter parameter that matches the CPU usage value of the Windows Task Manager.

@somnisomni
Copy link
Copy Markdown
Contributor

somnisomni commented Jul 11, 2022

Good to reference: https://docs.microsoft.com/en-us/troubleshoot/windows-client/performance/cpu-usage-exceeds-100

The change made by @airtaxi in this PR will make the program use the value which reflects actual processor activity. I tested this in my forked repo and works great, so I recommend to merge this ;)

@Kyome22
Copy link
Copy Markdown
Collaborator

Kyome22 commented Jul 16, 2022

@airtaxi
Do you complete to work in this pull request?

@airtaxi
Copy link
Copy Markdown
Contributor Author

airtaxi commented Jul 18, 2022

@airtaxi Do you complete to work in this pull request?

Yes! it's completed

@Kyome22
Copy link
Copy Markdown
Collaborator

Kyome22 commented Jul 19, 2022

I am not sure but I think it is great!

@Kyome22 Kyome22 merged commit 58828ad into runcat-dev:master Jul 19, 2022
@airtaxi airtaxi deleted the cpu branch August 1, 2022 13:23
@lynkas
Copy link
Copy Markdown

lynkas commented Nov 20, 2022

new PerformanceCounter("Processor Information", "% Processor Utility", "_Total"); is way too not accurate on my machine, instead I got a more precise result (nearly same as task manager) by this: https://stackoverflow.com/a/46737880/8883824

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

Successfully merging this pull request may close these issues.

4 participants