Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

How to: Profile with the Performance Wizard and Profiler Defaults

The Visual Studio Profiling Tools features and options enable you to completely control a profiling session. But in many cases, all that you need to discover performance issues in your project is to use the Performance Wizard to configure the session, the default settings of the Performance Explorer and Data Collection Control windows for data collection, and the standard Profiling Tools report views of the data.

This topic describes how to quickly profile a Windows client application by using the Performance Wizard and Profiling Tools default settings. The following procedures are described:

  • How to use the Performance Wizard to configure a performance session for a project.

  • How to collect performance data for an application, including how to insert marks in the profiling data file to assist in data analysis.

  • How to view and filter the performance data in the Visual Studio IDE.

  • How to use the Hot Path filter in the Call Tree view to find the functions in which your application spends the most time.

Because profiling can be complex, following the procedures in this topic will not guarantee that you identify a critical performance issue in your application. The topic is designed as an introduction to the Visual Studio Profiling Tools.

To create a performance session for Windows client application

  1. Open the solution in the Visual Studio IDE.

  2. On the Analyze menu, click Launch Performance Wizard.

  3. From the Which of the following available targets would you like to profile? drop-down list, select the name of the application that you want to profile, and then click Next. You can add more binaries later.

  4. Accept the default Sampling profiling method, and then click Next.

  5. Click Finish.

To collect performance data for the application

  1. If the Performance Explorer is not displayed, point to the Analyze menu, point to Windows, and then select Performance Explorer.

  2. Right-click the name of the performance session, and then select Launch with Profiling.

    The Data Collection Control window appears.

  3. Before you exercise the application functionality that you are interested in, select Mark One, and then click Insert Mark on the Data Collection Control toolbar.

  4. Exercise the application functionality that you are interested in.

  5. On the Data Collection Control toolbar, select Mark Two, and then click Insert Mark.

  6. Shut down the application in the regular manner. The Profiling Tools processes the performance data and displays the Summary view in the Visual Studio IDE. 

To filter the profiling data file to display the data collected between marks

  1. On the data view toolbar, select Marks from the Current View list.

  2. From the Mark Name list, select the rows that contain Mark One and Mark Two.

  3. Right-click and select Add Filter On Marks.

  4. Click Execute Filter on the data view filter.

To find the functions in your application that consume the most time

  1. On the data view toolbar, select Call Tree from the Current View list.

  2. On the data view toolbar, click Expand Hot Path.

  3. Find the functions in your application that are on the hot path.

Community Additions

© 2015 Microsoft