dotnet / roslyn-analyzers

MIT License
1.6k stars 467 forks source link

Measure performance of individual diagnostics #7455

Open Sybren- opened 1 month ago

Sybren- commented 1 month ago

With


<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net7.0</TargetFramework>
    <ReportAnalyzer>true</ReportAnalyzer>
  </PropertyGroup>
</Project>

and the command dotnet build my_project.csproj /binaryLogger

I was able to create a msbuildlog. When I open this file using the MSBuild Structured Log Viewer I see the following entry for my analyzer:

Image

This shows the accumulated time for the five diagnostics. Is it possible to get the time for each individual diagnostic? With a graph in which function(s) the time is spent?