Skip to content

Keep track of when a file code model is created.#60113

Merged
CyrusNajmabadi merged 1 commit intodotnet:mainfrom
CyrusNajmabadi:codeModelTracking
Mar 11, 2022
Merged

Keep track of when a file code model is created.#60113
CyrusNajmabadi merged 1 commit intodotnet:mainfrom
CyrusNajmabadi:codeModelTracking

Conversation

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

Note: we already collect information for CodeFunction.GetXml.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner March 11, 2022 15:27
@ghost ghost added the Area-IDE label Mar 11, 2022
@CyrusNajmabadi
Copy link
Copy Markdown
Contributor Author

@jasonmalinowski can you think of any other places someone might get access to codemodel other than FileCodeModel and CodeFunction.GetXml?

Comment on lines +41 to +42
// Keep track that code model was accessed. We want to get a sense of how widespread usage of it still is.
Logger.Log(FunctionId.CodeModel_FileCodeModel_Create);
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.

This should be fine, but note that the file code model objects are long-lived. If your goal is to just to figure out what percentage of sessions use CodeModel, this is fine. If you want to figure out something a bit more precise (like how often is CodeModel used within a sesson), you'll need to put this somewhere else.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

just trying to figure out the former. really, what percentage of users hit this.

@CyrusNajmabadi CyrusNajmabadi merged commit 7b8fe21 into dotnet:main Mar 11, 2022
@ghost ghost added this to the Next milestone Mar 11, 2022
@CyrusNajmabadi CyrusNajmabadi deleted the codeModelTracking branch March 12, 2022 17:11
@allisonchou allisonchou modified the milestones: Next, 17.2.P3 Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants