{"id":103,"date":"2020-09-29T12:41:48","date_gmt":"2020-09-29T19:41:48","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/?p=103"},"modified":"2020-09-29T12:47:45","modified_gmt":"2020-09-29T19:47:45","slug":"wpa-intro","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wpa-intro\/","title":{"rendered":"Windows Performance Analyzer &#8220;WPA&#8221; Intro"},"content":{"rendered":"<p>If you do a search online for WPA, you might find information for protecting your Wi-Fi, but that is a different type of WPA.<\/p>\n<p>In the performance &amp; diagnostics space WPA stands for <strong>W<\/strong>indows <strong>P<\/strong>erformance <strong>A<\/strong>nalyzer, a friendly but intricate UI that allows for developers and analyst to deep dive into performance traces captured on Windows (and beyond\u2026but more on that in a future post \ud83d\ude0a). Its great for discovering why CPU utilization is high? How much memory is being used in the system per process? Why does WPA itself use so much memory?<\/p>\n<p>WPA has siblings that help record traces on Windows, <strong>W<\/strong>indows <strong>P<\/strong>erformance <strong>R<\/strong>ecorder (aka WPR) and XPerf.\u00a0 All these tools are available in the <strong>W<\/strong>indows <strong>P<\/strong>erformance <strong>T<\/strong>oolkit (WPT), can be fetched directly from the <a href=\"https:\/\/developer.microsoft.com\/en-us\/windows\/downloads\/windows-10-sdk\/\">Windows Software Development Kit<\/a> or <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows-hardware\/get-started\/adk-install\">Windows Assessment and Deployment Kit<\/a>. If you would just like to use WPA and your running on Windows 10, you can fetch it directly from the <a href=\"https:\/\/www.microsoft.com\/en-us\/p\/windows-performance-analyzer\/9n0w1b2bxgnz?activetab=pivot:overviewtab\">Microsoft Store<\/a>.<\/p>\n<p>Since the paragraph above just listed a bunch of acronyms, might be good to have a cheat sheet:<\/p>\n<ul>\n<li>WPR \u2013 Windows Performance Recorder Command-line application<\/li>\n<li>WPA \u2013 Windows Performance Analyzer<\/li>\n<li>WPT \u2013 Windows Performance Toolkit<\/li>\n<li>SDK \u2013 Software Development Kit<\/li>\n<li>ADK \u2013 Assessments and Deployment Kit<\/li>\n<\/ul>\n<p>We hope that this blog and future posts help engineers, analyst, or anyone interested in performance\/diagnostic data understand how to better understand our tooling platform<\/p>\n<ul>\n<li>Software engineer who wants to diagnose his\/her apps or drivers.<\/li>\n<li>Program manager who wants to profile performance of apps or drivers.<\/li>\n<li>Testers who wants to measure performance of apps or drivers.<\/li>\n<li>Someone who likes to poke around new tools.<\/li>\n<\/ul>\n<h3>Getting Started<\/h3>\n<p>Before we get started using WPA, you may want to check out the <a href=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wpr-intro\/\">WPR Intro blog post<\/a>.<\/p>\n<p>WPA by default creates a \u201cGetting Started\u201d tab. Here you can learn about basics such as how to drag and drop graphs, configure presets, etc. We will cover some of these concepts in this intro.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-106 size-full\" src=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/Wpa-Main-Window.png\" alt=\"Image Wpa Main Window\" width=\"760\" height=\"594\" srcset=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/Wpa-Main-Window.png 760w, https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/Wpa-Main-Window-300x234.png 300w\" sizes=\"(max-width: 760px) 100vw, 760px\" \/><\/p>\n<p>Let\u2019s go ahead and load up a trace by going to File -&gt; Open, WPA will then process the trace and display the available tables in the \u2018Graph Explorer\u2019.\nThe \u2018Graph Explorer\u2019 consists of a few different categories, each category contains a Key Performance Indicator (KPI) which represents the type of graph and table data that is available.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-109 size-full\" src=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Trace-Loaded.png\" alt=\"Image WPA Trace Loaded\" width=\"758\" height=\"593\" srcset=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Trace-Loaded.png 758w, https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Trace-Loaded-300x235.png 300w\" sizes=\"(max-width: 758px) 100vw, 758px\" \/><\/p>\n<p>By dragging and dropping a graph to the analysis view, we can get a more detailed view of the table data.\nMultiple graphs can be dropped into an analysis view, the timelines will be sync between them.\nBy default, each dropped item will be in Graph and Table mode, where Graphs represent the primary way to visualize and tables detail the recorded data in a tabular form.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-108 alignleft\" src=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Drag-and-Drop-Graph.gif\" alt=\"Image WPA Drag and Drop Graph\" width=\"305\" height=\"250\" \/> <img decoding=\"async\" class=\"wp-image-110 alignright\" src=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Graph-Dropped-and-Loaded-300x235.png\" alt=\"Image WPA Graph Dropped and Loaded\" width=\"324\" height=\"246\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Graphs can have many different configuration modes depending on the table configuration:<\/p>\n<p><img decoding=\"async\" class=\"wp-image-115 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Graph-Legend-300x168.png\" alt=\"Image WPA Graph Legend\" width=\"464\" height=\"260\" srcset=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Graph-Legend-300x168.png 300w, https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Graph-Legend.png 574w\" sizes=\"(max-width: 464px) 100vw, 464px\" \/><\/p>\n<p>The data table is divided in a three areas: keys (grouping), data, and graphing:<\/p>\n<p><img decoding=\"async\" class=\"wp-image-116 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Table-Legend-300x190.png\" alt=\"Image WPA Table Legend\" width=\"463\" height=\"293\" srcset=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Table-Legend-300x190.png 300w, https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Table-Legend.png 506w\" sizes=\"(max-width: 463px) 100vw, 463px\" \/><\/p>\n<h5>Keys (Grouping)<\/h5>\n<p>The Keys area represents how we aggregate\/group the data, when multiple rows have the same value for a column, we will group the data together.\nMultiple columns can be dropped (or configured via the View Editor) to the left the gold bar.<\/p>\n<p>To learn more about the \u2018Gold\u2019 bar and aggregating, please see: <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows-hardware\/test\/wpt\/data-tables#key-area\">MSDN WPA &#8211; Key Area<\/a><\/p>\n<h5>Data<\/h5>\n<p>The data section between the Gold and Blue bar represents the aggregated value (if enabled on the column), or the row values if the group is expanded.<\/p>\n<p>For example, using the \u2018CPU Usage (Sampled)\u2019 table, we can see the data columns:<\/p>\n<p><img decoding=\"async\" class=\"wp-image-136 size-full aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Data-Area-Selected.png\" alt=\"Image WPA Data Area Selected\" width=\"755\" height=\"365\" srcset=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Data-Area-Selected.png 755w, https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Data-Area-Selected-300x145.png 300w\" sizes=\"(max-width: 755px) 100vw, 755px\" \/><\/p>\n<p>Also, notice how the graph will highlight the areas when selecting a row in the table are in sync, data shown in the table will be what is graphed.<\/p>\n<h5>Aggregation<\/h5>\n<p>We briefly mentioned aggregation previously, each column can be configured for aggregation.\u00a0 In the previous image, notice \u2018Count\u2019, \u2018Weight (in view)\u2019, and \u2018% Weight\u2019 are configured with \u2018Sum\u2019 aggregation.<\/p>\n<p>To change aggregation, simply right click on the column header:<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-137 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Right-Click-Column.png\" alt=\"Image WPA Right Click Column\" width=\"299\" height=\"340\" srcset=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Right-Click-Column.png 299w, https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Right-Click-Column-264x300.png 264w\" sizes=\"(max-width: 299px) 100vw, 299px\" \/><\/p>\n<h5>Graphing<\/h5>\n<p>Based on the configuration of the table, the graph will dynamically change.\nFor example, using the CPU Usge (Sampled) graph\/table, we can change the graphing column from \u2018% Weight\u2019 to \u2018TimeStamp\u2019 by dragging and dropping.\nDoing this will change the graph mode to \u2018Gantt\u2019, where each diamond represents the time the CPU sample occurred.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"alignnone wp-image-138 size-medium\" src=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-CPU-Table-Graphing-Weight-300x235.png\" alt=\"Image WPA CPU Table Graphing Weight\" width=\"300\" height=\"235\" srcset=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-CPU-Table-Graphing-Weight-300x235.png 300w, https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-CPU-Table-Graphing-Weight.png 638w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><span style=\"font-size: 24pt;\">\u21d2<\/span><img decoding=\"async\" class=\"alignnone wp-image-139 size-medium\" src=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-CPU-Table-Graphing-TimeStamp-300x235.png\" alt=\"Image WPA CPU Table Graphing TimeStamp\" width=\"300\" height=\"235\" srcset=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-CPU-Table-Graphing-TimeStamp-300x235.png 300w, https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-CPU-Table-Graphing-TimeStamp.png 635w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>To learn more about graph configurations, please see: <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows-hardware\/test\/wpt\/graphs\">MSDN WPA &#8211; Graphing<\/a><\/p>\n<h5>Time Selection, Highlighting, &amp; Zoom<\/h5>\n<p>WPA offers the ability to select time ranges and perform zoom operations.\u00a0 When selecting, the corresponding table data will also be selected.<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-144 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/2BA_2HighlightGraph_Animated2.gif\" alt=\"Image 2BA 2HighlightGraph Animated2\" width=\"574\" height=\"480\" \/><\/p>\n<p>Once an area has been selected (either by the graph or table), right clicking on the graph will give an option to Zoom into the specified time viewport.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-145 size-medium aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Right-Click-Graph-273x300.png\" alt=\"Image WPA Right Click Graph\" width=\"273\" height=\"300\" srcset=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Right-Click-Graph-273x300.png 273w, https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Right-Click-Graph.png 439w\" sizes=\"(max-width: 273px) 100vw, 273px\" \/><\/p>\n<p>Or, right clicking on the table will allow for filtering (and other operations) on the data.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-146 size-medium aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Right-Click-Table-180x300.png\" alt=\"Image WPA Right Click Table\" width=\"180\" height=\"300\" srcset=\"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Right-Click-Table-180x300.png 180w, https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-content\/uploads\/sites\/64\/2020\/09\/WPA-Right-Click-Table.png 430w\" sizes=\"(max-width: 180px) 100vw, 180px\" \/><\/p>\n<h3>Closing<\/h3>\n<p>We touched on a few basics today, but will be continuing the series focusing on different areas such as View Editor, Presets, Graph configurations, and beyond.<\/p>\n<p>Further reading:<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/windows-hardware\/test\/wpt\/windows-performance-analyzer\">Microsoft Docs for Windows Performance Analyzer<\/a> (including videos!)<\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/windows-hardware\/test\/wpt\/cpu-analysis\">CPU Analysis with WPA<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/windows-hardware\/test\/wpt\/microsoft-store-app-analysis\">Store App Analysis with WPA<\/a><\/li>\n<li><a href=\"https:\/\/channel9.msdn.com\/Shows\/Defrag-Tools\/Defrag-Tools-156-Critical-Path-Analysis-with-Windows-Performance-Analyzer\">Critical Path Analysis with WPA (video)<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>If you do a search online for WPA, you might find information for protecting your Wi-Fi, but that is a different type of WPA. In the performance &amp; diagnostics space WPA stands for Windows Performance Analyzer, a friendly but intricate UI that allows for developers and analyst to deep dive into performance traces captured on [&hellip;]<\/p>\n","protected":false},"author":40009,"featured_media":110,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,2],"tags":[14,13,9],"class_list":["post-103","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-performance-diagnostics","category-windows-performance-analyzer","tag-windows-performance-analyzer","tag-wpa","tag-wpt"],"acf":[],"blog_post_summary":"<p>If you do a search online for WPA, you might find information for protecting your Wi-Fi, but that is a different type of WPA. In the performance &amp; diagnostics space WPA stands for Windows Performance Analyzer, a friendly but intricate UI that allows for developers and analyst to deep dive into performance traces captured on [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-json\/wp\/v2\/posts\/103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-json\/wp\/v2\/users\/40009"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-json\/wp\/v2\/comments?post=103"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-json\/wp\/v2\/posts\/103\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-json\/wp\/v2\/media\/110"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-json\/wp\/v2\/media?parent=103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-json\/wp\/v2\/categories?post=103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/performance-diagnostics\/wp-json\/wp\/v2\/tags?post=103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}