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

Fix incorrect usage of environment.processor count when collect metrics #39

Conversation

BroEnotiKa
Copy link
Contributor

@BroEnotiKa BroEnotiKa commented Jun 27, 2023

#38

Environment.ProcessorCount from NET6+ respects process affinity and the job object's hard limit on CPU utilization
https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/environment-processorcount-on-windows

so we should get total number of system cores from NativeHostMetricsCollector_Windows instead

@BroEnotiKa BroEnotiKa self-assigned this Jun 27, 2023
@BroEnotiKa BroEnotiKa merged commit ea89f8b into master Jul 19, 2023
shalin-ae added a commit that referenced this pull request Jul 19, 2023
…sage_of_Environment.ProcessorCount_when_collect_metrics"

This reverts commit ea89f8b, reversing
changes made to 9902ecd.
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.

2 participants