How to: Choose Collection Methods

 

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

The Visual Studio Profiling Tools support three methods of collecting performance data: sampling, instrumentation, and concurrency. You can also use either the sampling or instrumentation method to collect .NET memory allocation and lifetime data.

Requirements

  • Visual Studio Ultimate, Visual Studio Premium, Visual Studio Professional

You can use the performance session Method property to specify the most appropriate collection method for your application. You can set the collection method from Performance Wizard, Performance Explorer, or from the property pages of a performance session. If you are using command-line tools, see Profiling from the Command-Line for more information.

To select a collection method using the Performance Wizard

  • On the first page of the wizard, select one of the following options:
OptionDescription
CPU SamplingCollects application statistics that are useful for initial analysis and for analyzing CPU utilization issues.
InstrumentationCollects detailed timing data that are useful for focused analysis and for analyzing input/output performance issues.
.NET Memory AllocationCollects .NET Framework memory allocation data by using the sampling profiling method.
ConcurrencyCollects numeric resource contention data.

To select a collection method using Performance Explorer

  1. On the Performance Explorer toolbar, click the arrow next to the Method drop-down list.

  2. Click the collection method that you prefer.

To select the sampling or instrumentation method using performance session properties

  1. In Performance Explorer, select the performance session.

    A performance session file name has a .psess extension.

  2. Right-click the performance session, and then click Properties.

  3. In the Property Pages, click General.

  4. Click the collection method that you prefer.

To select .NET memory data collection by using performance session properties

  1. In Performance Explorer, select the performance session.

    A performance session file name has a .psess extension.

  2. Right-click the performance session, and then click Properties.

  3. In the Property Pages, click General.

  4. Click Sampling or Instrumentation.

  5. Click Collect .NET object allocation information to collect the size and number of .NET Framework object allocations.

  6. (Optional) Click Also collect .NET object lifetime information to collect data about the garbage collection generations in which the object memory was reclaimed.

    For information about the other options that are available when you are collecting .NET memory data, see Collecting .NET Memory Allocation and Lifetime Data.

To select concurrency data collection by using performance session properties

  1. In Performance Explorer, right-click the performance session, and then click Properties.

  2. In the Property Pages, click General.

  3. Click Concurrency.

Configuring Performance Sessions
Understanding Sampling Data Values
Performance Session Properties

Show: