Export (0) Print
Expand All

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

Aa985639.alert_note(en-us,VS.90).gifNote:

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

  1. Open a command line window.

  2. For a managed application, type the following command to set the appropriate environment variables:

    <drive>:\<path>\VsPerfCLREnv /sampleon

  3. At the command prompt, run the following command to start VSPerfCmd:

    <drive>:\<path>vsperfcmd -start:sample -output:c:\<path>data_file_name

  4. At the command prompt, run the following command to start your application:

    <drive>:\<path>vsperfcmd -launch:application_name

  5. Run the application to generate data.

  6. Exit the application.

  7. At the command prompt, run the following command to shutdown VSPerfCmd:

    c:\<path>vsperfcmd -shutdown

    A data file, data_file_name.VSP, is created in the directory specified in the VSPerfCmd /output parameter.

  8. 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.

Community Additions

Show:
© 2015 Microsoft