-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Support independently enabling hosting event counters and metrics #50565
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
Conversation
LGTM. Can you please try the crank command they're using and see what the results look like? @EgorBo posted it in the issue. |
BTW this is approved for 8.0, pending confirmation from @JulieLeeMSFT or @EgorBo that it meets their needs. |
If there an easy way to run that command on the PR changes? |
Check out I think that may do it... |
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.
👍
{ | ||
context.EventLogOrMetricsEnabled = true; | ||
context.MetricsEnabled = true; | ||
context.MetricsTagsFeature ??= new HttpMetricsTagsFeature(); |
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.
This gets allocated per request when metrics are on?
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.
It’s cached on the context
Thanks for the quick fix!! |
@JamesNK Ready for merge? |
Yes |
Is it going to be backported to 8.0 ? |
Yes. This PR is on the |
it seesm that it didn't help with the initial issue:
still 2x slow, it uses aspnet from this commit: a413f2e0f8ec (yesterday) so presumably includes this fix. |
Hi @EgorBo. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context. |
It wouldn't fix the issue because crank uses event counters and we did nothing to improve the usage of interlocked. |
Addresses #50412
This allows hosting event counters and metrics to be independently enabled. If only metrics are enabled, then the event source
Interlocked
calls are skipped. However, there is no performance improvement if both event counters and metrics are enabled.