Skip to content

Collect telemetry data about how many evaluations various CLI activities cause #52983

@baronfel

Description

@baronfel

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 #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.

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions