Export (0) Print
Expand All

How to: Choose Collection Methods

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.

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 Using the Profiling Tools 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:

Option

Description

CPU Sampling

Collects application statistics that are useful for initial analysis and for analyzing CPU utilization issues.

Instrumentation

Collects detailed timing data that are useful for focused analysis and for analyzing input/output performance issues.

.NET Memory Allocation

Collects .NET Framework memory allocation data by using the sampling profiling method.

Concurrency

Collects numeric resource contention data, process and thread execution data that is useful in analyzing multi-threaded and multi-process applications. When you select Concurrency, you must select at least one of the following options:

  • Collect resource contention data collects numeric data for contention events.

  • Visualize the behavior of multithreaded applications collects thread and process execution data. This option is not available when you profile an ASP.NET application.

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.

  4. Select one or both of the following options:

    • Collect resource contention data: collects numeric data for contention events.

    • Visualize the behavior of multithreaded applications: collects thread and process information execution data. This option is not available when you profile an ASP.NET application.

    For information about the other options that are available when you are collecting concurrency data, see Collecting Thread and Process Concurrency Data.

Community Additions

ADD
Show:
© 2014 Microsoft