{"id":247062,"date":"2024-02-12T10:58:27","date_gmt":"2024-02-12T18:58:27","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=247062"},"modified":"2024-02-12T11:27:08","modified_gmt":"2024-02-12T19:27:08","slug":"a-look-back-visual-studios-profiling-tool-advancements-in-2023","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/a-look-back-visual-studios-profiling-tool-advancements-in-2023\/","title":{"rendered":"A Look Back: Visual Studio\u2019s Profiling Tool Advancements in 2023"},"content":{"rendered":"<p>In retrospect, the past year our team was on a mission to enhance Profiling tools, making them more efficient and user-friendly. We improved instrumentation and our .NET counter tool, broadened platform support, seamlessly integrated unit test profiling, and boosted overall performance. Your valuable feedback via Developer Community was crucial in making Visual Studio&#8217;s profiling experience noticeably more intuitive.\nIn this post, you will get a summary of the 2023 changes providing an opportunity to catch up on any enhancements you may have overlooked.<\/p>\n<p>All features listed below are available in our latest Visual Studio version and are accessible across all Visual Studio SKUs unless explicitly stated otherwise.<\/p>\n<p style=\"text-align: center;\"><div  class=\"d-flex justify-content-center\"><a class=\"cta_button_link btn-primary mb-24\" href=\"https:\/\/visualstudio.microsoft.com\/downloads\/\" target=\"_blank\">Download Visual Studio 2022<\/a><\/div><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>Contents<\/strong><\/p>\n<ul>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/a-look-back-visual-studios-profiling-tool-advancements-in-2023\/#boost-your-productivity-with-improved-instrumentation-tool\">Boost Your Productivity with Improved Instrumentation Tool<\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/a-look-back-visual-studios-profiling-tool-advancements-in-2023\/#enhancements-across-profiling-tools\">Enhancements Across Profiling Tools\u00a0 <\/a>\n<ul>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/a-look-back-visual-studios-profiling-tool-advancements-in-2023\/#net-counters-tool-in-debugging-scenario\">.NET Counters Tool in Debugging Scenario\u00a0 <\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/a-look-back-visual-studios-profiling-tool-advancements-in-2023\/#new-instruments-via-meters-api\">New Instruments via Meters API <\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/a-look-back-visual-studios-profiling-tool-advancements-in-2023\/#net-object-allocation-tool\">.NET Object Allocation tool <\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/a-look-back-visual-studios-profiling-tool-advancements-in-2023\/#profiler-live-graph-for-net-on-wsl\">Profiler Live Graph for .NET on WSL\u00a0 <\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/a-look-back-visual-studios-profiling-tool-advancements-in-2023\/#benchmarkdotnet-idiagnosers\">BenchmarkDotNet IDiagnosers\u00a0 <\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/a-look-back-visual-studios-profiling-tool-advancements-in-2023\/#test-profiling\">Test Profiling\u00a0 <\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/a-look-back-visual-studios-profiling-tool-advancements-in-2023\/#faster-and-more-reliable-profiling-tools\">Faster and More Reliable Profiling Tools\u00a0 <\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/a-look-back-visual-studios-profiling-tool-advancements-in-2023\/#in-the-summary\">In the Summary\u00a0 <\/a><\/li>\n<\/ul>\n<p><strong>\u00a0<\/strong><\/p>\n<h2>Boost Your Productivity with Improved Instrumentation Tool<\/h2>\n<p>The Instrumentation tool has undergone significant improvements, making it faster and more versatile than ever before. Now, it supports C++ code, enhancing the capabilities for performance analysis. The Instrumentation Data View displays a list of functions ordered by duration, streamlining the identification of potential bottlenecks.This feature was inspired by the Developer Community suggestion: <a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Profiling--Instrumentation-of-C-CMake\/10437470\">Profiling \/ Instrumentation of C++ CMake application quits immediately with no data captured <\/a><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/image-2.png\"><img decoding=\"async\" class=\"wp-image-247065 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/image-2.png\" alt=\"Instrumentation\" width=\"1176\" height=\"687\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/image-2.png 1962w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/image-2-300x175.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/image-2-1024x599.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/image-2-768x449.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/image-2-1536x898.png 1536w\" sizes=\"(max-width: 1176px) 100vw, 1176px\" \/><\/a>\nLearn more about these enhancements in our recent blog: <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/improving-visual-studio-performance-with-the-new-instrumentation-tool\/\">Improving Visual Studio performance with the new Instrumentation Tool &#8211; Visual Studio Blog (microsoft.com)<\/a><\/p>\n<p>Another noteworthy addition is the &#8220;Start with collection pause&#8221; option, enabling the temporary suspension of data collection during application profiling. This feature proves especially advantageous in scenarios like gaming, where users prefer full immersion before data collection commences. This feature was inspired by the Developer Community suggestion: <a href=\"https:\/\/developercommunity.visualstudio.com\/t\/removed-profiling-options-Instrumenting\/10385122\">Support pause for Instrumentation Profiling<\/a><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/new.png\"><img decoding=\"async\" class=\"wp-image-247072 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/new.png\" alt=\"Image new\" width=\"1197\" height=\"629\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/new.png 1936w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/new-300x158.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/new-1024x538.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/new-768x403.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/new-1536x807.png 1536w\" sizes=\"(max-width: 1197px) 100vw, 1197px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Learn More from our documentation: <a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/profiling\/cpu-usage?view=vs-2022#collect-cpu-usage-data\">Analyze CPU usage in the Performance Profiler &#8211; Visual Studio (Windows) | Microsoft Learn<\/a>.<\/p>\n<h2>Enhancements Across Profiling Tools<\/h2>\n<h3>.NET Counters Tool in Debugging Scenario<\/h3>\n<p>You can easily access the .NET Counter from the diagnostics window by picking the &#8220;.NET Counters&#8221; option from the &#8220;Select Tool&#8221; dropdown menu. You can also use the features of .NET Counters to monitor and evaluate important performance metrics while you are debugging your code.<\/p>\n<h3><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/17.8p1-dotnetcounters.png\"><img decoding=\"async\" class=\"wp-image-247073 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/17.8p1-dotnetcounters.png\" alt=\" dotnetcounters\" width=\"1284\" height=\"712\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/17.8p1-dotnetcounters.png 1825w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/17.8p1-dotnetcounters-300x166.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/17.8p1-dotnetcounters-1024x568.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/17.8p1-dotnetcounters-768x426.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/17.8p1-dotnetcounters-1536x852.png 1536w\" sizes=\"(max-width: 1284px) 100vw, 1284px\" \/><\/a><\/h3>\n<h3>New Instruments via Meters API<\/h3>\n<p>.NET Counters tool brings integration with the .NET Meters API, introducing two new instrument options: &#8220;Counter&#8221; and &#8220;ObservableCounter&#8221;. The &#8220;Counter&#8221; keeps track of a value changing over time, with the caller reporting updates using &#8220;Counter&lt;T&gt;.Add.&#8221; In contrast, the &#8220;ObservableCounter&#8221; is like the Counter, but the caller takes care of keeping track of the total value.<\/p>\n<p>You can find these metrics in the list of the .NET counter metrics roster, offering enhanced visibility into system performance and resource utilization.\nThis feature was inspired by the Developer Community suggestion: \u00a0<a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Performance-Profiler:-NET-Counters-shou\/1545011\">Performance Profiler: .NET Counters should support custom counters <\/a><\/p>\n<h3>.NET Object Allocation tool<\/h3>\n<p>Additionally, the .NET Object Allocation tool has been enhanced to seamlessly import allocations from a .NET data provider through ETL file formats. This will help you analyze allocation events and monitor memory usage effectively.<\/p>\n<p>Learn more about .NET allocation tool: <a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/profiling\/dotnet-alloc-tool?view=vs-2022\">Analyze memory usage for .NET objects <\/a><\/p>\n<h3>Profiler Live Graph for .NET on WSL<\/h3>\n<p>Profiling tools now support live graphs while collecting from dotnet-monitor for WSL. The WSL live metrics are available for .NET object allocation, CPU usage, and the .NET counter tool. While the tool is initially collecting data from dotnet-monitor for WSL you can see the real-time graphing for live counter information, then you can stop collecting and see detailed breakdown views of memory allocation, call trees, functions, collections, and other related data.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/profiling-wsl-live-graph.png\"><img decoding=\"async\" class=\"wp-image-247077 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/profiling-wsl-live-graph.png\" alt=\"Image profiling wsl live graph\" width=\"1000\" height=\"628\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/profiling-wsl-live-graph.png 624w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/profiling-wsl-live-graph-300x188.png 300w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/a><\/p>\n<h3>BenchmarkDotNet IDiagnosers<\/h3>\n<p>The Visual Studio Profiler has been upgraded to include support for BenchmarkDotNet IDiagnosers. These IDiagnosers are essential for efficiently gathering diagnostic data from BenchmarkDotNet scenarios.<\/p>\n<p>The Benchmark tab offers a visualization of the executed benchmarks and provides the ability to precisely choose a benchmark from the swimlane by double-clicking on a specific row.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/17.8.p2.idiagnosers-gotosource.gif\"><img decoding=\"async\" class=\"size-full wp-image-247074 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/17.8.p2.idiagnosers-gotosource.gif\" alt=\"Image 17 8 p2 idiagnosers gotosource\" width=\"1276\" height=\"580\" \/><\/a><\/p>\n<p>You can also navigate to the source file through the right-click context menu. The statistical data is sourced directly from BenchmarkDotNet and is presented in a structured grid format.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/17.8.p2.idiagnosers-swimlane.gif\"><img decoding=\"async\" class=\"size-full wp-image-247075 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/17.8.p2.idiagnosers-swimlane.gif\" alt=\"Image 17 8 p2 idiagnosers swimlane\" width=\"1276\" height=\"580\" \/><\/a><\/p>\n<h2><\/h2>\n<h2>Test Profiling<\/h2>\n<p>We have introduced an updated Test Profiling capability in Visual Studio 2022. When you right-click on your test in Test Explorer and select \u201cProfile,\u201d you can now choose from a set of available tools, including CPU Usage, GPU Usage, File IO, .NET Async, and Events Viewer. Simply select the tools you want to use, click \u201cStart,\u201d and a report will be generated for you. This feature provides a powerful and convenient way to analyze the performance of your tests and identify potential issues.\nLearn more about Test Profiling from our recent blog: <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/a-unit-of-profiling-makes-the-allocations-go-away\/\">A unit of profiling makes the allocations go away &#8211; Visual Studio Blog (microsoft.com)<\/a><\/p>\n<p>This feature is only available in our Visual Studio Enterprise Version. <a href=\"https:\/\/visualstudio.microsoft.com\/downloads\/\">Download Here<\/a><\/p>\n<h2><\/h2>\n<h2>Faster and More Reliable Profiling Tools<\/h2>\n<p>Our team has dedicated additional resources to enhance reliability and performance across various tools, with notable improvements in the Performance Profiler&#8217;s stop collection functionality. The stop collection now runs approximately 3.5 times faster when generating and almost 15 times faster when using cached values (which are always used if available). We\u2019ve tested this using a 10-second trace in Visual Studio, and version 17.6 demonstrates a considerably faster performance than previous versions 17.5 and 17.4.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/Picture4.png\"><img decoding=\"async\" class=\"wp-image-247076 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/Picture4.png\" alt=\"Image perf improvements\" width=\"812\" height=\"507\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/Picture4.png 1533w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/Picture4-300x187.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/Picture4-1024x639.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2024\/02\/Picture4-768x479.png 768w\" sizes=\"(max-width: 812px) 100vw, 812px\" \/><\/a><\/p>\n<h2>In the Summary<\/h2>\n<p>Thank you for entrusting us with your needs and aspirations. We will keep working on our Profiling tools to make your Profiling experience smoother and more efficient.<\/p>\n<p>If you have any thoughts or suggestions, please share them with us on the <a href=\"https:\/\/developercommunity.visualstudio.com\/home\">Developer Community<\/a> site. Your feedback is very important to us.<\/p>\n<p>Learn more about these and other features in Visual Studio\u2019s Profiling tool by checking out additional resources.<\/p>\n<ul>\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/profiling\/?view=vs-2022\">Measure performance in Visual Studio &#8211; Visual Studio (Windows) | Microsoft Learn<\/a><\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/releases\/2022\/release-notes\">Visual Studio 2022 Release Notes | Microsoft Learn<\/a><\/li>\n<li><a href=\"https:\/\/www.youtube.com\/playlist?list=PLReL099Y5nRf2cOurn1hI-gSRxsdbC27C\">VS Profiling Series &#8211; Visual Studio Toolbox &#8211; YouTube<\/a><\/li>\n<\/ul>\n<p>Stay connected with the Visual Studio team by following us on <a href=\"https:\/\/twitter.com\/VS_Debugger\">Twitter @VS_Debugger<\/a>, <a href=\"https:\/\/twitter.com\/VisualStudio\">Twitter @VisualStudio<\/a>, YouTube, and <a href=\"https:\/\/www.linkedin.com\/showcase\/microsoft-visual-studio\/\">LinkedIn.<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In retrospect, the past year our team was on a mission to enhance Profiling tools, making them more efficient and user-friendly. We improved instrumentation and our .NET counter tool, broadened platform support, seamlessly integrated unit test profiling, and boosted overall performance. Your valuable feedback via Developer Community was crucial in making Visual Studio&#8217;s profiling experience [&hellip;]<\/p>\n","protected":false},"author":26573,"featured_media":247065,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[6839,6743,6920,6815],"class_list":["post-247062","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-developer-productivity","tag-profiling","tag-test-profiling","tag-visual-studio-2022"],"acf":[],"blog_post_summary":"<p>In retrospect, the past year our team was on a mission to enhance Profiling tools, making them more efficient and user-friendly. We improved instrumentation and our .NET counter tool, broadened platform support, seamlessly integrated unit test profiling, and boosted overall performance. Your valuable feedback via Developer Community was crucial in making Visual Studio&#8217;s profiling experience [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/247062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/26573"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=247062"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/247062\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/247065"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=247062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=247062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=247062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}