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

Simplify initialization of RuntimeMetrics #105539

Merged
merged 4 commits into from
Jul 26, 2024
Merged

Conversation

jkotas
Copy link
Member

@jkotas jkotas commented Jul 26, 2024

  • Trigger the RuntimeMetrics initialization only when actually needed in the MeterListener constructor.
  • Delete the lock-ordering workaround and wrong comment introduced in Fix Deadlock Inside Metrics Code #105259. Triggering the RuntimeMetrics initialization only when actually needed should make the lock-ordering workaround unnecessary.

- Trigger the RuntimeMetrics initialization only when actually needed in the MeterListener constructor.
- Delete the lock-ordering workaround and wrong comment introduced in dotnet#105259. Trigger the RuntimeMetrics initialization only when actually needed should make the lock-ordering workarond unnecessary.
Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to take this as-is, or if you wanted to go further you could eliminate all the unused static fields as discussed in the comment. Thanks @jkotas!

Copy link
Contributor

@rokonec rokonec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Copy link
Member

@tarekgh tarekgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jkotas

@tarekgh tarekgh merged commit 16f8730 into dotnet:main Jul 26, 2024
79 of 84 checks passed
@jkotas jkotas deleted the runtime-metrics branch July 26, 2024 17:24
@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants