dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.05k stars 4.04k forks source link

Aggregate telemetry for understanding analyzers/fixer perf to report on slow analyzers #67074

Closed arunchndr closed 3 weeks ago

arunchndr commented 1 year ago
CyrusNajmabadi commented 1 year ago

Small tweak: We want to collect information on the following:

  1. How long each lightbulb priority group is taking. A group doesn't show until it is done, so we need to know the aggregate time for the group.
  2. How long individual analzyers/refactoring providers are taking to provide light bulb items. This will help us establish which providers are causing a group to be slow to appear.
  3. How long individual actions take to apply. This doesn't impact time to bring up lightbulb, but it does impact time to get to the preview, and time the user has to wait once they do invoke an action.
CyrusNajmabadi commented 1 year ago

Once we have info for 1/2/3 above, we can then drive perf improvements for particular analyzers/refactorings/actions. If we aren't sure what's causing slowness (and we can't repro locally), we can add more targetted aggregate tracking on a per analyzer/refactoring and per-action basis, and then let the telemetry for those guide us.

mavasani commented 1 year ago

@ToddGrun is this complete now? Any more planned work for this? If not, we should probably close this out.

ToddGrun commented 1 year ago

@mavasani -- I need to get this code working in vscode, that's my main goal this week.

CyrusNajmabadi commented 3 weeks ago

@ToddGrun do we still need this? Can we close out otherwise?

ToddGrun commented 3 weeks ago

This has been done for a while, closing this out. We have telemetry for analyzers and dashboards created.