{"id":5805,"date":"2022-04-14T17:38:27","date_gmt":"2022-04-15T00:38:27","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/pix\/?p=5805"},"modified":"2022-04-18T17:43:55","modified_gmt":"2022-04-19T00:43:55","slug":"timing-capture-metrics-view-improvements-in-pix-2203-30","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/pix\/timing-capture-metrics-view-improvements-in-pix-2203-30\/","title":{"rendered":"Timing Capture Metrics View improvements in PIX 2203.30"},"content":{"rendered":"<p>The <a href=\"https:\/\/devblogs.microsoft.com\/pix\/download\/\">2203.30 version of PIX on Windows<\/a> contains two new features in the <a href=\"https:\/\/devblogs.microsoft.com\/pix\/timing-captures-new\/\">Timing Capture<\/a> Metrics View.\u00a0 We added both of these features based on your feedback.\u00a0 The first new feature is the ability to graph a PIX CPU events execution time and stalled time, in addition to its duration.\u00a0 The second feature is an enhancement to the <a href=\"https:\/\/devblogs.microsoft.com\/pix\/graphing-consolidated-events-in-the-timing-capture-metrics-view\/\">consolidated events feature<\/a>.<\/p>\n<h5>Graphing Execution and Stalled Time<\/h5>\n<p>When a PIX CPU event is graphed in the Metrics View, the duration of the event is graphed by default. The duration is the amount of time taken from the time the event started running until the time the event stopped running. This time includes any time that the event was not running due to a context switch. The amount of time the event was not running is the stalled time. The duration minus the stalled time is the execution time, or the amount of time the code in the event itself ran.<\/p>\n<p>The execution time and stalled time can be graphed in addition to the duration. Graph the stalled or execution time by expanding the row containing the name of the event in the Active Metrics Panel as shown in the following figure.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2022\/04\/pix_new_timing_capture_metrics_view_execution_time.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-5803\" src=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2022\/04\/pix_new_timing_capture_metrics_view_execution_time.png\" alt=\"Image pix new timing capture metrics view execution time\" width=\"1329\" height=\"678\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2022\/04\/pix_new_timing_capture_metrics_view_execution_time.png 1329w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2022\/04\/pix_new_timing_capture_metrics_view_execution_time-300x153.png 300w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2022\/04\/pix_new_timing_capture_metrics_view_execution_time-1024x522.png 1024w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2022\/04\/pix_new_timing_capture_metrics_view_execution_time-768x392.png 768w\" sizes=\"(max-width: 1329px) 100vw, 1329px\" \/><\/a><\/p>\n<h5>Event consolidation per-thread<\/h5>\n<p>Since releasing the <a href=\"https:\/\/devblogs.microsoft.com\/pix\/graphing-consolidated-events-in-the-timing-capture-metrics-view\/\">consolidated events feature<\/a> we&#8217;ve received feedback that its common to use the same &#8220;Frame *&#8221; string for an event name on multiple threads.\u00a0 For example, you may use an event named &#8220;Frame 456&#8221; to identify a frame on your main thread, but then also use &#8220;Frame 456&#8221; on your worker threads to identify which tasks go with that frame.\u00a0 In this case, consolidating all events that follow the &#8220;Frame *&#8221; pattern across all threads into a single event for purposes of graphing in the metrics view isn&#8217;t useful.\u00a0 Instead, you probably want the consolidation to be scoped to the events on each thread.\u00a0 PIX now does this.\u00a0 In the following example, I&#8217;ve used the same &#8220;RenderWorker::Process *&#8221; event on two threads, Render1 and Render2.\u00a0 These now show up as different consolidated events:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2022\/04\/consolidated_events_per_thread.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-5810\" src=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2022\/04\/consolidated_events_per_thread.png\" alt=\"Image consolidated events per thread\" width=\"218\" height=\"140\" \/><\/a><\/p>\n<p>If you prefer the old behavior in which PIX doesn&#8217;t scope the consolidation by thread, use the following setting to cause PIX to consolidate across all threads:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2022\/04\/consolidated_events_per_thread_setting.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-5811\" src=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2022\/04\/consolidated_events_per_thread_setting.png\" alt=\"Image consolidated events per thread setting\" width=\"493\" height=\"237\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2022\/04\/consolidated_events_per_thread_setting.png 493w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2022\/04\/consolidated_events_per_thread_setting-300x144.png 300w\" sizes=\"(max-width: 493px) 100vw, 493px\" \/><\/a><\/p>\n<p>As always, use the feedback button in the upper right corner of PIX to send us an email with feature requests or bug reports.<\/p>\n<p>Steven.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The 2203.30 version of PIX on Windows contains two new features in the Timing Capture Metrics View.\u00a0 We added both of these features based on your feedback.\u00a0 The first new feature is the ability to graph a PIX CPU events execution time and stalled time, in addition to its duration.\u00a0 The second feature is an [&hellip;]<\/p>\n","protected":false},"author":1915,"featured_media":5803,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5805","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pix"],"acf":[],"blog_post_summary":"<p>The 2203.30 version of PIX on Windows contains two new features in the Timing Capture Metrics View.\u00a0 We added both of these features based on your feedback.\u00a0 The first new feature is the ability to graph a PIX CPU events execution time and stalled time, in addition to its duration.\u00a0 The second feature is an [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/posts\/5805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/users\/1915"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/comments?post=5805"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/posts\/5805\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/media\/5803"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/media?parent=5805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/categories?post=5805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/tags?post=5805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}