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

Add counters to System.Runtime.Caching.MemoryCache #51760

Merged
merged 3 commits into from
May 7, 2021

Conversation

StephenMolloy
Copy link
Member

Add event counters to MemoryCache.

Full Framework MemoryCache publishes performance counters, but
those went away in the .Net Core port. To help Azure applications
capture performance metrics, we can add these same counters back
to the .Net Core implementation using event counters.

Copy link
Member

@mconnew mconnew left a comment

Choose a reason for hiding this comment

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

:shipit:

@davidfowl
Copy link
Member

Do you need to worry about different instances of the cache ?

@StephenMolloy
Copy link
Member Author

Do you need to worry about different instances of the cache ?

A different Counters EventSource is created for each MemoryCache instance, and they are differentiated by including the name of the cache. This is similar to how MemoryCache publishes per-cache-instance perf counters in NetFx today.

@StephenMolloy StephenMolloy merged commit b2046c7 into dotnet:main May 7, 2021
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 19, 2021
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