Skip to content

Commit

Permalink
Rename WPA Plugin and Exe to QuicTrace (microsoft#1490)
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks authored Apr 19, 2021
1 parent f47df5d commit f66d036
Show file tree
Hide file tree
Showing 38 changed files with 71 additions and 70 deletions.
6 changes: 3 additions & 3 deletions .azure/azure-pipelines.plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ stages:
parameters:
arch: x86

- stage: build_wpa
displayName: Build WPA Plugin
- stage: build_quictrace
displayName: Build QuicTrace
dependsOn: []
jobs:
- template: ./templates/build-config-wpa.yml
- template: ./templates/build-config-quictrace.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This template contains steps to build MsQuic WPA plugin.

jobs:
- job: build_wpa
- job: build_quictrace
displayName: Any CPU
pool:
vmImage: windows-latest
Expand All @@ -11,19 +11,19 @@ jobs:
- task: NuGetCommand@2
displayName: Nuget Restore
inputs:
restoreSolution: src\plugins\msquic.wpa.sln
restoreSolution: src\plugins\QuicTrace.sln

- task: VSBuild@1
continueOnError: true
inputs:
solution: src\plugins\msquic.wpa.sln
solution: src\plugins\QuicTrace.sln
platform: Any CPU
configuration: Debug

- task: VSBuild@1
continueOnError: true
inputs:
solution: src\plugins\msquic.wpa.sln
solution: src\plugins\QuicTrace.sln
platform: Any CPU
configuration: Release

Expand Down
4 changes: 2 additions & 2 deletions docs/Diagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ netsh.exe trace convert quic.etl

> **Important** - If you're using a version of MsQuic that uses an ETW manifest version more recent than the one built into the Windows image, decoding may not provide correct output. **TODO** - Provide instructions to get around this problem.
You may also open the trace in Windows Performance Analyzer. See the [WPA instructions](../src/plugins/wpa/README.md) for more details.
You may also open the trace in Windows Performance Analyzer. See the [WPA instructions](../src/plugins/trace/README.md) for more details.

### Using WPR to Collect Traces

Expand Down Expand Up @@ -99,7 +99,7 @@ clog2text_lttng -i quic.babel.txt -s clog.sidecar -o quic.log --showTimestamp --
# Trace Analysis

MsQuic supports a custom plugin for Windows Performance Analyzer (WPA) to detailed analysis of ETW traces. See the [WPA instructions](../src/plugins/wpa/README.md) for more details.
MsQuic supports a custom plugin for Windows Performance Analyzer (WPA) to detailed analysis of ETW traces. See the [WPA instructions](../src/plugins/trace/README.md) for more details.

# Performance Counters

Expand Down
2 changes: 1 addition & 1 deletion docs/TSG.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ App Main returning status 0

As you can see from the output of `secnetperf.exe` the resulting `25869 RPS` is nowhere near what it should be. The next step is to grab a performance trace to see what is going on. For these type of issues the best way to collect the traces would be to [use WPR](./Diagnostics.md#using-wpr-to-collect-traces) (with `Scheduling.Verbose` or `Performance.Verbose` profiles).

Once you have the ETL, open it [in WPA using the MsQuic plugin](../src/plugins/wpa/README.md). First thing after opening, let's take a look at the QUIC Worker utilization. In the `Graph Explorer`, under `Computation`, expand `QUIC Workers` and open the one labeled `Utilization by Worker`. For the example above (server-side trace), here is what the output looks like:
Once you have the ETL, open it [in WPA using the MsQuic plugin](../src/plugins/trace/README.md). First thing after opening, let's take a look at the QUIC Worker utilization. In the `Graph Explorer`, under `Computation`, expand `QUIC Workers` and open the one labeled `Utilization by Worker`. For the example above (server-side trace), here is what the output looks like:

![](images/rss-debug-1.png)

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/msquic.wpa.sln → src/plugins/QuicTrace.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29102.190
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QuicEventDataSource", "wpa\QuicEventDataSource.csproj", "{CCE5ECE9-8DCD-4E3F-8389-D48B728355DF}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QuicTraceLib", "trace\dll\QuicTraceLib.csproj", "{CCE5ECE9-8DCD-4E3F-8389-D48B728355DF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QuicEtw", "wpacmd\QuicEtw.csproj", "{8A55FED8-CF16-4BD1-AB7B-41C9BD3E91CC}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QuicTrace", "trace\exe\QuicTrace.csproj", "{8A55FED8-CF16-4BD1-AB7B-41C9BD3E91CC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System.Net;
using System.Runtime.InteropServices;

namespace MsQuicTracing.DataModel.ETW
namespace QuicTrace.DataModel.ETW
{
internal unsafe ref struct QuicEtwDataReader
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Microsoft.Diagnostics.Tracing;
using Microsoft.Performance.SDK;

namespace MsQuicTracing.DataModel.ETW
namespace QuicTrace.DataModel.ETW
{
[Flags]
internal enum QuicEtwEventKeywords : ulong
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Generic;
using Microsoft.Performance.SDK;

namespace MsQuicTracing.DataModel
namespace QuicTrace.DataModel
{
public sealed class QuicConnection : IQuicObject
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System;
using Microsoft.Performance.SDK;

namespace MsQuicTracing.DataModel
namespace QuicTrace.DataModel
{
[Flags]
public enum QuicDataAvailableFlags
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Generic;
using Microsoft.Performance.SDK;

namespace MsQuicTracing.DataModel
namespace QuicTrace.DataModel
{
public sealed class QuicDatapath : IQuicObject
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#pragma warning disable CA1305 // Specify IFormatProvider

namespace MsQuicTracing.DataModel
namespace QuicTrace.DataModel
{
public enum QuicEventParseMode
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#pragma warning disable CA1305 // Specify IFormatProvider
#pragma warning disable CA1707 // Identifiers should not contain underscores

namespace MsQuicTracing.DataModel
namespace QuicTrace.DataModel
{
public enum QuicApiType
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Collections.Generic;
using System.Linq;

namespace MsQuicTracing.DataModel
namespace QuicTrace.DataModel
{
public interface IQuicObject
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Generic;
using System.Linq;

namespace MsQuicTracing.DataModel
namespace QuicTrace.DataModel
{
public sealed class QuicState
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Generic;
using Microsoft.Performance.SDK;

namespace MsQuicTracing.DataModel
namespace QuicTrace.DataModel
{
public sealed class QuicStream : IQuicObject
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Collections.Generic;
using Microsoft.Performance.SDK;

namespace MsQuicTracing.DataModel
namespace QuicTrace.DataModel
{
public sealed class QuicWorker : IQuicObject
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"WPA": {
"commandName": "Executable",
"executablePath": "f:\\xperf\\wpa.exe",
"commandLineArgs": "-addsearchdir $(SolutionDir)..\\..\\artifacts\\bin\\wpa\\$(Configuration)",
"commandLineArgs": "-addsearchdir $(SolutionDir)..\\..\\artifacts\\bin\\quictrace\\$(Configuration)",
"nativeDebugging": false
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System.Linq;
using Microsoft.Performance.SDK.Processing;

namespace MsQuicTracing
namespace QuicTrace
{
/// <summary>
/// This custom data source defines processes MsQuic ETW events.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
using Microsoft.Performance.SDK.Extensibility;
using Microsoft.Performance.SDK.Extensibility.DataCooking;
using Microsoft.Performance.SDK.Extensibility.DataCooking.SourceDataCooking;
using MsQuicTracing.DataModel;
using QuicTrace.DataModel;

namespace MsQuicTracing
namespace QuicTrace
{
public sealed class QuicEventCooker : CookedDataReflector, ISourceDataCooker<QuicEvent, object, Guid>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
using Microsoft.Performance.SDK;
using Microsoft.Performance.SDK.Extensibility.SourceParsing;
using Microsoft.Performance.SDK.Processing;
using MsQuicTracing.DataModel;
using MsQuicTracing.DataModel.ETW;
using QuicTrace.DataModel;
using QuicTrace.DataModel.ETW;

#pragma warning disable CA1031 // Do not catch general exception types

namespace MsQuicTracing
namespace QuicTrace
{
public enum QuicEventSourceType
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
using Microsoft.Performance.SDK.Extensibility;
using Microsoft.Performance.SDK.Extensibility.SourceParsing;
using Microsoft.Performance.SDK.Processing;
using MsQuicTracing.DataModel;
using QuicTrace.DataModel;

namespace MsQuicTracing
namespace QuicTrace
{
public class QuicEventProcessor : CustomDataProcessorBaseWithSourceParser<QuicEvent, object, Guid>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Nullable>enable</Nullable>
<RootNamespace>MsQuicTracing</RootNamespace>
<RootNamespace>QuicTrace</RootNamespace>
<NoWarn>1701;1702;CA1036;CA1815;CA1720;CA1008;CA1711;CA1028</NoWarn>
<Authors>Microsoft</Authors>
<Company>Microsoft Corporation</Company>
Expand All @@ -13,7 +13,6 @@
<RepositoryUrl>https://github.com/microsoft/msquic.git</RepositoryUrl>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>MsQuic.DataSource</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.1">
Expand All @@ -31,6 +30,6 @@
</None>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="echo f | xcopy $(TargetDir)$(TargetName).dll $(SolutionDir)..\..\artifacts\bin\wpa\$(Configuration)\ /Y&#xD;&#xA;echo f | xcopy $(TargetDir)$(TargetName).pdb $(SolutionDir)..\..\artifacts\bin\wpa\$(Configuration)\ /Y&#xD;&#xA;echo f | xcopy $(TargetDir)Microsoft.Diagnostics.FastSerialization.dll $(SolutionDir)..\..\artifacts\bin\wpa\$(Configuration)\ /Y&#xD;&#xA;echo f | xcopy $(TargetDir)Microsoft.Diagnostics.Tracing.TraceEvent.dll $(SolutionDir)..\..\artifacts\bin\wpa\$(Configuration)\ /Y" />
<Exec Command="echo f | xcopy $(TargetDir)$(TargetName).dll $(SolutionDir)..\..\artifacts\bin\quictrace\$(Configuration)\ /Y&#xD;&#xA;echo f | xcopy $(TargetDir)$(TargetName).pdb $(SolutionDir)..\..\artifacts\bin\quictrace\$(Configuration)\ /Y&#xD;&#xA;echo f | xcopy $(TargetDir)Microsoft.Diagnostics.FastSerialization.dll $(SolutionDir)..\..\artifacts\bin\quictrace\$(Configuration)\ /Y&#xD;&#xA;echo f | xcopy $(TargetDir)Microsoft.Diagnostics.Tracing.TraceEvent.dll $(SolutionDir)..\..\artifacts\bin\quictrace\$(Configuration)\ /Y" />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
using Microsoft.Performance.SDK;
using Microsoft.Performance.SDK.Extensibility;
using Microsoft.Performance.SDK.Processing;
using MsQuicTracing.DataModel;
using QuicTrace.DataModel;

namespace MsQuicTracing.Tables
namespace QuicTrace.Tables
{
[Table]
public sealed class QuicApiTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
using Microsoft.Performance.SDK;
using Microsoft.Performance.SDK.Extensibility;
using Microsoft.Performance.SDK.Processing;
using MsQuicTracing.DataModel;
using QuicTrace.DataModel;

namespace MsQuicTracing.Tables
namespace QuicTrace.Tables
{
[Table]
public sealed class QuicConnectionTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
using Microsoft.Performance.SDK;
using Microsoft.Performance.SDK.Extensibility;
using Microsoft.Performance.SDK.Processing;
using MsQuicTracing.DataModel;
using QuicTrace.DataModel;

namespace MsQuicTracing.Tables
namespace QuicTrace.Tables
{
[Table]
public sealed class QuicDataBatchingTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
using Microsoft.Performance.SDK;
using Microsoft.Performance.SDK.Extensibility;
using Microsoft.Performance.SDK.Processing;
using MsQuicTracing.DataModel;
using QuicTrace.DataModel;

namespace MsQuicTracing.Tables
namespace QuicTrace.Tables
{
[Table]
public sealed class QuicExecutionTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
using Microsoft.Performance.SDK;
using Microsoft.Performance.SDK.Extensibility;
using Microsoft.Performance.SDK.Processing;
using MsQuicTracing.DataModel;
using QuicTrace.DataModel;

namespace MsQuicTracing.Tables
namespace QuicTrace.Tables
{
[Table]
public sealed class QuicNetworkTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
using Microsoft.Performance.SDK;
using Microsoft.Performance.SDK.Extensibility;
using Microsoft.Performance.SDK.Processing;
using MsQuicTracing.DataModel;
using QuicTrace.DataModel;

namespace MsQuicTracing.Tables
namespace QuicTrace.Tables
{
[Table]
public sealed class QuicSchedulingTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
using Microsoft.Performance.SDK;
using Microsoft.Performance.SDK.Extensibility;
using Microsoft.Performance.SDK.Processing;
using MsQuicTracing.DataModel;
using QuicTrace.DataModel;

namespace MsQuicTracing.Tables
namespace QuicTrace.Tables
{
[Table]
public sealed class QuicStreamLifetimeTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
using Microsoft.Performance.SDK;
using Microsoft.Performance.SDK.Extensibility;
using Microsoft.Performance.SDK.Processing;
using MsQuicTracing.DataModel;
using QuicTrace.DataModel;

namespace MsQuicTracing.Tables
namespace QuicTrace.Tables
{
[Table]
public sealed class QuicTxBlockedTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
using Microsoft.Performance.SDK;
using Microsoft.Performance.SDK.Extensibility;
using Microsoft.Performance.SDK.Processing;
using MsQuicTracing.DataModel;
using QuicTrace.DataModel;

namespace MsQuicTracing.Tables
namespace QuicTrace.Tables
{
[Table]
public sealed class QuicWorkerActivityTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
using System;
using Microsoft.Performance.SDK.Extensibility;
using Microsoft.Performance.Toolkit.Engine;
using MsQuicTracing;
using MsQuicTracing.DataModel;
using QuicTrace.DataModel;

namespace MsQuicEtw
namespace QuicTrace
{
class Program
{
Expand Down
Loading

0 comments on commit f66d036

Please sign in to comment.