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

Rework resource monitor #4803

Merged
merged 14 commits into from
Jun 17, 2024

Conversation

vmapetr
Copy link
Contributor

@vmapetr vmapetr commented May 21, 2024

This PR reworks resource monitor methods to improve the resource monitors and fix the issue with the performance degradation on Windows machines.

WI: 2173920

Changes:

  • CPU metrics methods are fixed
  • Metrics catching between debug and warning monitors are added to improve performance
  • Windows metrics methods now use .Net ManagementObjectSearcher queries instead of direct calls of the deprecated WMIC.exe
  • Synchronous metric methods now replaced with asynchronous requests with cancellation support
  • Other improvements in syntax

Testing:
Validated on Windows 11 / Ubuntu 22.04 / MacOS 14.0

@vmapetr vmapetr force-pushed the v-mpetrov/us-2173920-resource-monitor-performance-fix branch from 883a749 to 856ff5a Compare May 27, 2024 22:33
@vmapetr vmapetr force-pushed the v-mpetrov/us-2173920-resource-monitor-performance-fix branch from 363464d to ed4c4c2 Compare May 30, 2024 23:22
@vmapetr vmapetr marked this pull request as ready for review May 30, 2024 23:56
@vmapetr vmapetr requested review from a team as code owners May 30, 2024 23:56
src/Agent.Worker/ResourceMetricsManager.cs Outdated Show resolved Hide resolved
src/Agent.Worker/ResourceMetricsManager.cs Outdated Show resolved Hide resolved
src/Agent.Worker/ResourceMetricsManager.cs Outdated Show resolved Hide resolved
src/Agent.Worker/ResourceMetricsManager.cs Outdated Show resolved Hide resolved
src/Agent.Worker/ResourceMetricsManager.cs Outdated Show resolved Hide resolved
src/Agent.Worker/ResourceMetricsManager.cs Outdated Show resolved Hide resolved
src/Agent.Worker/ResourceMetricsManager.cs Outdated Show resolved Hide resolved
src/Agent.Worker/ResourceMetricsManager.cs Outdated Show resolved Hide resolved
@vmapetr vmapetr merged commit 8b332ae into master Jun 17, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants