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

Additional statistics when a ServiceProvider is created #57753

Merged
merged 1 commit into from
Aug 24, 2021

Conversation

allantargino
Copy link
Contributor

Adds the following statistics to the existing ServiceProviderBuilt event:

  • Number of open generics
  • Number of closed generics

fix #52364

* Number of open generics
* Number of closed generics

fix dotnet#52364
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Aug 19, 2021
@ghost
Copy link

ghost commented Aug 19, 2021

Tagging subscribers to this area: @eerhardt, @maryamariyan
See info in area-owners.md if you want to be subscribed.

Issue Details

Adds the following statistics to the existing ServiceProviderBuilt event:

  • Number of open generics
  • Number of closed generics

fix #52364

Author: allantargino
Assignees: -
Labels:

area-Extensions-DependencyInjection

Milestone: -

@allantargino
Copy link
Contributor Author

allantargino commented Aug 19, 2021

Most of the required statistics were already implemented by #56809.
Also, I haven't implemented - Number of descriptors in the collection because it can be derived by clients from the sum of singleton, scoped and transient services. Let me know if it would be best to have it as part of the event :)

Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

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

The implementation looks good.

I'd like @davidfowl to sign off that these new values are useful.

Copy link
Member

@davidfowl davidfowl left a comment

Choose a reason for hiding this comment

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

LGTM

@eerhardt
Copy link
Member

@davidfowl - do you want this in 6.0? Or is it OK to just merge it for 7.0.

@davidfowl
Copy link
Member

6.0.0 would be nice. Feels low risk.

@maryamariyan maryamariyan added this to the 6.0.0 milestone Aug 19, 2021
@eerhardt eerhardt merged commit 4ab31fa into dotnet:main Aug 24, 2021
@eerhardt
Copy link
Member

/backport to release/6.0

@github-actions
Copy link
Contributor

Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1163217720

@allantargino allantargino deleted the issue-52364 branch August 24, 2021 20:13
@ghost ghost locked as resolved and limited conversation to collaborators Sep 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Extensions-DependencyInjection community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add EventSource event for service registration statistics
4 participants