共用方式為


Performance session properties

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

A Performance Session enables you to configure settings that determine how the application is profiled. It also stores reports that are generated for the profiling session.

You create a Performance Session by running the Performance Wizard or by manually creating a session. The Performance Session is displayed in the Performance Explorer after the Performance Session has been created.

To view Performance Session properties, select the session name in Performance Explorer, right-click it and then select Properties.

The performance session has the following property pages:

General

These settings enable you to select the profiling method, to add .NET object collection and lifetime data, and to specify the default report location and naming conventions.

For more information, see:

How to: Choose collection methods

Collect .NET memory allocation and lifetime data

Launch

These settings enable you to select from a list of binaries and specify the start order of the binaries.

For more information, see How to: Specify the binary to start

Sampling

These settings enable you to select the sample event and sampling interval when sampling is used as the profiling method. A sample event is used to collect profiling data at the specified interval. For example, if the sample event is clock cycles and the sampling interval is set to 10,000,000 then profiling data is collected after every 10 million clock cycles. The following four types of sample events are available:

  • Clock Cycles - for CPU bound problems
  • Page Faults - for memory related problems
  • System Calls - for I/O related problems
  • Performance Counters - for low-level performance problems
  • Additional sample events can be specified based on available performance counters

For more information, see How to: Choose sampling events

Binary

These settings enable you to specify whether you want to relocate the instrumented binary to another location. For example, if you are profiling My.DLL and choose not to relocate the instrumented binary, a backup copy of My.DLL named My.Orig.DLL is created. Subsequently, My.DLL is modified by inserting probes to collect data. If you decide to relocate the instrumented binary, the original binary is not renamed and the instrumented binary is copied to the specified location for use during instrumentation.

For more information, see How to: Specify the binary to start

Tier interactions

For more information, see Collecting tier interaction data

Instrumentation

These settings enable you to collect performance data for JScript code in ASP.NET Web pages and specify any Pre-instrument and Post-instrument events that you want to occur before or after the instrumentation process.

For more information, see:

How to: Profile JavaScript code in web pages

How to: Specify pre- and post-instrument commands

CPU counters

These settings enable you to collect data about CPU performance counters when you are using the instrumentation profiling method. Portable Performance counters are available regardless of the CPU design or manufacturer. Platform Events are specific to the CPU design and manufacturer. For more information about on-chip performance counters, see the specific processor documentation.

For more information, see How to: Collect CPU counter data

Windows events

During profiling, you can collect data from event trace providers. You can view the data by using the VSPerfReport.exe command line tool /calltrace option. For more information about Event Tracing for Windows (ETW), see About Event Tracing.

For more information, see:

How to: Collect event tracing for Windows (ETW) data

VSPerfReport.

Windows counters

This option enables you to collect data from Windows Performance Monitor counters. To collect this data, select the check box labeled Collect Windows Performance Counters. The collection interval can be set in the Collection Interval box. Counter Category and Instance might be available also. Some default Windows Performance Monitor counters are available.

For more information, see How to: Collect Windows counter data.

Advanced

These settings enable you to add options to the instrumentation process by specifying one or more options of the VSInstr command line profiling tool. You can also specify the version of the Common Runtime to profile when the application is using more than one version.

For more information, see:

How to: Specify the .NET Framework runtime

How to: Specify additional instrumentation options

See also

Overviews Configure performance sessions Control data collection