You can use VSPerfMon tool to collect performance data for an application; typically this tool is launched by VSPerfCmd.exe. VSPerfMon displays additional information about process attach or detach which is not available by using the VSPerfCmd tool. To view this information, start VSPerfMon in a separate window. To invoke VSPerfMon use the following syntax:
VSPerfMon [/U] </TRACE [/COUNTER:cfg] | /SAMPLE | /COVERAGE> /CROSSSESSION /OUTPUT <file name> [/WINCOUNTER:cfg] [/USER [DOMAIN\]username]
The following table describes VSPerfMon tool options:
Redirected console output is written as Unicode. This must be the first option specified.
Redirects output to the specified file name.
Starts performance monitor for instrumented profiling.
Starts the performance monitor for sampling profiling.
Starts the performance monitor for code coverage collection.
Starts the performance monitor for concurrency profiling. By default, the /CONCURRENCY option collects resource contention data and thread visualization and execution data. You can specify one of the following options to restrict the collected to resource contention data or to thread visualization and execution data.
To collect both resource contention data and thread visualization and execution data, use /CONCURRENCY without either the /THREADONLY option with the /CONCURRENCY option.
Allows client access to the performance monitor from the specified account.
Enables cross-session profiling.
When the instrumentation (TRACE) profiling method is used, specifies a CPU counter to be collected at each instrumentation point. You can collect multiple counter data by specifying multiple Counter options.
Use the following syntax to specify the counter (cfg) data:
Specifies a Windows performance counter to include with mark data. path is a Windows Performance counter string in PDH counter path format. For example:
\Processor(0)\% Processor Time
Specifies the time interval (in milliseconds) between automatic marks when you use /WINCOUNTER. Rounded up to the nearest 500ms.
Use 0 to disable automatic marks. (default=500ms if unspecified)