Skip to content

Additional statistics when a ServiceProvider is created - #57753

Merged
eerhardt merged 1 commit into
dotnet:mainfrom
allantargino:issue-52364
Aug 24, 2021
Merged

Additional statistics when a ServiceProvider is created#57753
eerhardt merged 1 commit into
dotnet:mainfrom
allantargino:issue-52364

Conversation

@allantargino

Copy link
Copy Markdown
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
fixdotnet#52364
@ghostghost added area-Extensions-DependencyInjection community-contribution Indicates that the PR has been added by a community member labels Aug 19, 2021
@ghost

Copy link
Copy Markdown

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

allantargino commented Aug 19, 2021

Copy link
Copy Markdown
ContributorAuthor

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 :)

@eerhardteerhardt left a comment

Copy link
Copy Markdown
Member

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.

@davidfowldavidfowl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@eerhardt

Copy link
Copy Markdown
Member

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

@davidfowl

Copy link
Copy Markdown
Member

6.0.0 would be nice. Feels low risk.

@maryamariyanmaryamariyan added this to the 6.0.0 milestone Aug 19, 2021
@eerhardt
eerhardt merged commit 4ab31fa into dotnet:mainAug 24, 2021
@eerhardt

Copy link
Copy Markdown
Member

/backport to release/6.0

@github-actions

Copy link
Copy Markdown
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
@ghostghost locked as resolved and limited conversation to collaborators Sep 23, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Extensions-DependencyInjectioncommunity-contributionIndicates 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

@allantargino@eerhardt@davidfowl@maryamariyan