dotnet / dotnet/roslyn

Generator telemetry should include timings for each table transform

Open
#81,027 0 comments 1 reaction 2 assignees Claimed by @chsienki View on GitHub
Area-Compilers Feature - Source Generators
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

We have timing information for the overall generator driver run time and timing for the individual generator run time within a driver.

We report each table operation via the `NodeExtensions.LogTables` extension method, but don't record how long it took to execute.

We should update the extension method to take a timespan that represents how long the table operation took to execute. We should then update the `CodeAnalysisEventSource.NodeTransform` to take that timespan and report it via ETW.

We can expand the `GeneratorTimerExtensions` extension methods that we use for generator timing to have a similar pattern for the table operations.

When we don't perform a table operation because the table is all cached, we should report the time as zero.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.