Collect telemetry data about how many evaluations various CLI activities cause
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
### Is your feature request related to a problem? Please describe.
The dotnet CLI often has to evaluate MSBuild projects for various kinds of data - Target Frameworks, Output Types, packages, etc. These evaluations do have a cost - and each one is computed fresh _every time_. We should be able to measure how many evaluations we do across the various commands in the dotnet CLI. Features like https://github.com/dotnet/sdk/issues/52982 rely on doing many evaluations, so this cost can add up.
### Describe the solution you'd like
* When we load projects in our commands, we should be able to increment some counter tracking the number of evaluations
* when we trigger builds, our telemetry logger should track each evaluation and count it - we should be able to get this data via the ProjectEvaluationFinishedEventArgs
* as part of our shutdown/cleanup, we should submit a telemetry event with some data about the evaluations we did:
* total count
* time distribution of the evaluations, if possible
### Additional context
As with all telemetry, we need to document this in-repo and update the MS learn disclosures.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.