Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

External code in VS2015 Profiler

VS2015 includes some new tools for diagnosing WPF applications performance. My solution contains more than one project (e.g. View and ViewModel projects). When I start my View project in diagnose mode and measure CPU usage, a considerable portion of it is being utilized by the VM project, which is shown as "External Code" in the results. How can I tell diagnostic tools to include all projects of my solution when diagnosing.

Edit

(Note for the people who skip comments)

I know about the "External Code" checkbox available in "Filter View" dropdown. The problem with that option is that if I turn it on, it starts showing lower-level Framework functions in the call stack too (things like nt.dll, presentationcore.dll etc), which means that a function of my VM may get buried 20 levels deep into the call hierarchy. I need a way to ask it to filter any Framework-level functions and just show code from the current solution.

like image 290
dotNET Avatar asked Nov 02 '15 16:11

dotNET


People also ask

How do you check performance of code in Visual Studio?

Open the Performance Profiler by choosing Debug > Performance Profiler (or Alt + F2). For more information on using the CPU Usage or Memory usage tool in the Performance Profiler vs. the debugger-integrated tools, see Run profiling tools with or without the debugger.

How do you analyze CPU performance?

Collect CPU usage dataSelect Debug > Performance Profiler. Under Available tools, select CPU Usage, and then select Start. After the app starts, the diagnostic session begins and displays CPU usage data.


1 Answers

When you have the diagnostic view up, look for a dropdown that says "Filter View". It's in the area below the graph but above the listview. Click the dropdown and check the "Show External Code" checkbox.

(Also, who downvoted this question without leaving a comment? That's entirely unhelpful. If you thought the question was trivial, why not say that while answering the question?)

like image 178
AndreN Avatar answered Sep 29 '22 18:09

AndreN