Compartilhar via


Using Profiling Methods to Collect Performance Data from the Command Line

Note

This article applies to Visual Studio 2015. 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

Your choice of Visual Studio Profiling Tools command-line tools and options depends on factors such as the type of application that you are profiling, the profiling method that you want to use, and whether the target application is written in native or .NET Framework code.

This topic organizes the command-line procedural topics according to the profiling method that you choose.

In this topic

Using the sampling method to collect performance statistics

Using the instrumentation method to collect detailed timing data

Using .NET memory methods to collect memory allocation and object lifetime data

Using the concurrency method to collect resource contention and thread activity data

Adding tier interaction data to a profiling run

Using the sampling method to collect performance statistics

The Profiling Tools sampling method collects performance data at specified intervals in a profiling run. Sampling data can provide insights into CPU-bound performance issues, and it can be a good way to start exploring the performance of an application.

You can start the profiler and the application at the same time, or you can attach the profiler to a running instance of an application.

Task Target application type
Launch an application - Stand-Alone Applications
Attach to a running process - .NET Framework Stand-Alone Applications
- Native Stand-Alone Applications
- ASP.NET Web Applications
- .NET Services
- Native Services

Using the instrumentation method to collect detailed timing data

The Profiling Tools instrumentation method collects performance data from copies of application binaries that contain software probes to record performance information. Instrumentation data is collected at the start and end of each instrumented function and at every call to other functions from the instrumented function. The instrumentation method is useful for discovering performance issues with I/O issues such as disk usage.

You create the instrumented binary with the VInstr.exe tool. After you initialize the profiler, data is automatically collected from the instrumented binaries when you run the target application.

Target Application Type

Using .NET memory methods to collect memory allocation and object lifetime data

The Profiling Tools .NET memory method enables you to collect .NET Framework memory allocation data and information about the lifetime of objects in the .NET Framework.

You can start the target application by using the profiler; you can attach the profiler to a running instance of an application; and you can create instrumented versions of the application to collect detailed timing information together with the .NET Framework memory data.

Task Target application type
Launch an application - Stand-Alone .NET Framework Applications
Attach to a running process - .NET Framework Stand-Alone Applications
- ASP.NET Web Applications
- .NET Services
Instrument modules - .NET Framework Stand-Alone Components
- Statically Compiled ASP.NET Web Applications
- Dynamically Compiled ASP.NET Web Applications
- .NET Services

Using the concurrency method to collect resource contention and thread activity data

The Profiling Tools concurrency method enables you to collect resource contention and thread and process activity data from multithreaded applications.

You can start the application by using the profiler, or you can attach the profiler to a running instance of an application.

Task Target application type
Launch an application - Stand-Alone .NET Framework Application
- Stand-Alone Native Application
Attach to a running process - .NET Framework Stand-Alone Application
- Native Stand-Alone Application
- ASP.NET Web Application
- .NET Service
- Native Service

Adding tier interaction data to a profiling run

Adding tier interaction data to a profiling run requires specific procedures with the command line profiling tools. See Collecting tier interaction data

See Also

Profiling Stand-Alone Applications
Profiling ASP.NET Web Applications
Profiling Services