-
Notifications
You must be signed in to change notification settings - Fork 302
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
[Instrumentation.Runtime] Two internal refactors #559
Conversation
Codecov Report
@@ Coverage Diff @@
## main #559 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 167 167
Lines 5101 5100 -1
=====================================
+ Misses 5101 5100 -1
|
{ | ||
tasks.Add(Task.Run(() => { Console.Write("Hi"); })); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could probably add Asserts for pending items as well.
} | ||
|
||
Task.WaitAll(tasks.ToArray()); | ||
|
||
meterProvider.ForceFlush(MaxTimeToAllowForFlush); | ||
|
||
var lockContentionCountMetric = exportedItems.FirstOrDefault(i => i.Name == "process.runtime.dotnet.monitor.lock_contention.count"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated to this PR, another refactoring suggestion: You could probably have these metrics names stored as const
strings in RuntimeMetrics.cs
and refer them here without having to hard code them.
Left some suggestions which could be considered in a follow-up PR. |
Fixes #.
Changes
Refactor some private code for minor non-blocker comments.
thread_pool.completed_items.count
: [Instrumentation.Runtime] Add unit tests #510 (comment)const
: [Instrumentation.Runtime] Enable CodeAnalysis for Runtime Instrumentation library #555 (comment)For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes