How to: Gather Sampling Data Using Command-line Tools
You can use the Visual Studio Team System Developer Edition Profiling Tools from within the IDE or from a command prompt. The steps in the following list show you how to profile by using the sampling method from a command prompt
Command-line tools are located in C:\Program Files\Microsoft Visual Studio 9\Team Tools\Performance Tools> directory.
To sample applications by using the command-line tool
Open a command line window.
For a managed application, type the following command to set the appropriate environment variables:
At the command prompt, run the following command to start VSPerfCmd:
<drive>:\<path>vsperfcmd -start:sample -output:c:\<path>data_file_name
At the command prompt, run the following command to start your application:
Run the application to generate data.
Exit the application.
At the command prompt, run the following command to shutdown VSPerfCmd:
A data file, data_file_name.VSP, is created in the directory specified in the VSPerfCmd /output parameter.
Open the data file in the Report View window of the Visual Studio IDE to examine the profiling data. Point to the File menu, and then click Open. Locate the data file and then click Open.