This page provides the install, setup and usage instructions for Windows Performance Analyzer (WPA) and use it to analyze MsQuic traces.
The following are currently only possible on Windows. Other platforms may be supported by WPA in the future.
The easiest way to use WPA is via the ./scripts/wpa.ps1
script, but additional detailed instructions can be found below.
- Download the preview version from the Windows Store.
- You should then be able to run WPA from:
$env:LOCALAPPDATA\Microsoft\WindowsApps\wpa.exe
- Build the plugin via
QuicTrace.sln
or download it from the latest release (i.e. v1.0.0). - Update/create your WPA shortcut by adding
-addsearchdir <path_to_quic_plugin_folder>
.
WPA is extremely powerful. It can operate very quickly on multi-gigabyte trace files and let you slice & dice the data many different ways to really drill down into what's going on.
Select and Open .etl file
- Directory
- Select directory which includes traces. WPA automatically traverses and find trace files.
- File
- Compress the directory as zip
- change the extension to .ctf
- Select the .ctf file
One of the built-in capabilities of WPA is the ability to analyze CPU trace information to see the CPU usage of the various call stacks in the code. For instance, in the above Flame Graph you can easily see that the most expensive function (58% of total CPU usage!) is CxPlatEncrypt
.
Linux perf command is one of the way to collect such information.
# on Linux
sudo apt-get install -y linux-tools-`uname -r`
# use your own options
perf record -a -g -F 10 -o out.perf.data
# ".perf.data.txt" extension is required for later visualize on WPA
perf script -i out.perf.data > out.perf.data.txt
The perf command's artifact can be visualized on Windows through WPA.
Follow steps below to load perf extension on WPA.
# on Windows
cd ${WORKDIR}
git clone https://github.com/microsoft/Microsoft-Performance-Tools-Linux-Android
cd .\Microsoft-Performance-Tools-Linux-Android\PerfDataExtensions
dotnet build
# use absolute path
wpa.exe -addsearchdir ${WORKDIR}\Microsoft-Performance-Tools-Linux-Android\PerfDataExtensions\bin\Debug\netstandard2.1\
# Open out.perf.data.txt on WPA. You might need to open multiple time if you see error at opening (known issue?)
Change visualization type by drop down menu as shown in image below. Also you can filter in data for each CPU etc.
TODO - Add more details/instructions.
TODO