diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index 51b1cdb30d..4e9a842c15 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -54,15 +54,14 @@ jobs: uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee with: dotnet-version: 6.0.x + - name: Install Dependencies + run: dotnet tool install --global Microsoft.Performance.Toolkit.Plugins.Cli --version 0.1.25-preview - name: Build run: dotnet build src\plugins\QuicTrace.sln -c ${{ matrix.configuration }} - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a with: name: bin_quictrace_${{ matrix.configuration }} path: artifacts/bin/quictrace/${{ matrix.configuration }} - # Package the plugin - - name: Install plugintool - run: dotnet tool install --global Microsoft.Performance.Toolkit.Plugins.Cli --version 0.1.25-preview - name: Package shell: pwsh run: | diff --git a/src/plugins/trace/dll/Tables/QuicStreamLifetime.cs b/src/plugins/trace/dll/Tables/QuicStreamLifetime.cs index 469be65b69..557b60f681 100644 --- a/src/plugins/trace/dll/Tables/QuicStreamLifetime.cs +++ b/src/plugins/trace/dll/Tables/QuicStreamLifetime.cs @@ -84,6 +84,21 @@ public sealed class QuicStreamLifetimeTable new ColumnMetadata(new Guid("{D0612FB2-4243-4C13-9164-5D55837F7E04}"), "Type"), new UIHints { AggregationMode = AggregationMode.UniqueCount }); + private static readonly ColumnConfiguration processIdColumnConfig = + new ColumnConfiguration( + new ColumnMetadata(new Guid("{73bf47c1-a87e-473e-8337-dfc8442da9bb}"), "Process (ID)"), + new UIHints { AggregationMode = AggregationMode.Max }); + + private static readonly ColumnConfiguration threadIdColumnConfig = + new ColumnConfiguration( + new ColumnMetadata(new Guid("{b58d4999-21b8-4462-8dd7-6bf483d45b15}"), "ThreadId"), + new UIHints { AggregationMode = AggregationMode.Max }); + + private static readonly ColumnConfiguration cpuColumnConfig = + new ColumnConfiguration( + new ColumnMetadata(new Guid("{48ab57b9-e0df-4068-856a-a2c2ffdfa8f3}"), "CPU"), + new UIHints { AggregationMode = AggregationMode.Sum }); + private static readonly ColumnConfiguration countColumnConfig = new ColumnConfiguration( new ColumnMetadata(new Guid("{9583D245-BD70-4BA3-A249-088F0D6C0D8C}"), "Count"), @@ -102,6 +117,9 @@ public sealed class QuicStreamLifetimeTable typeColumnConfig, TableConfiguration.PivotColumn, TableConfiguration.LeftFreezeColumn, + processIdColumnConfig, + threadIdColumnConfig, + cpuColumnConfig, timeColumnConfig, TableConfiguration.RightFreezeColumn, TableConfiguration.GraphColumn, @@ -123,6 +141,9 @@ public static void BuildTable(ITableBuilder tableBuilder, QuicState quicState) var dataProjection = Projection.Index(events); table.AddColumn(typeColumnConfig, dataProjection.Compose(ProjectType)); + table.AddColumn(processIdColumnConfig, dataProjection.Compose(ProjectProcessId)); + table.AddColumn(threadIdColumnConfig, dataProjection.Compose(ProjectThreadId)); + table.AddColumn(cpuColumnConfig, dataProjection.Compose(ProjectCpu)); table.AddColumn(countColumnConfig, Projection.Constant(1)); table.AddColumn(timeColumnConfig, dataProjection.Compose(ProjectTime)); @@ -139,6 +160,21 @@ private static string ProjectType(QuicEvent evt) return evt.EventId == QuicEventId.StreamCreated ? "Stream Create" : "Stream Destroy"; } + private static uint ProjectProcessId(QuicEvent evt) + { + return evt.ProcessId; + } + + private static uint ProjectThreadId(QuicEvent evt) + { + return evt.ThreadId; + } + + private static ushort ProjectCpu(QuicEvent evt) + { + return evt.Processor; + } + private static Timestamp ProjectTime(QuicEvent evt) { return evt.TimeStamp; diff --git a/src/plugins/trace/dll/pluginManifest.json b/src/plugins/trace/dll/pluginManifest.json index 9f40a66ee5..1c6afb5973 100644 --- a/src/plugins/trace/dll/pluginManifest.json +++ b/src/plugins/trace/dll/pluginManifest.json @@ -2,7 +2,7 @@ "$schema": "https://raw.githubusercontent.com/microsoft/microsoft-performance-toolkit-sdk/main/src/PluginsSystem/Tools/Microsoft.Performance.Toolkit.Plugins.Cli/Manifest/PluginManifestSchema.json", "identity": { "id": "QuicTrace", - "version": "1.0.2" + "version": "1.0.3" }, "displayName": "QuicTrace", "description": "Used to open MsQuic trace files.",