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.
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:
CounterName is the name of a counter returned by the VSPerfCmd /QueryCounters command.
Reloadis the counter event sampling interval. Do not use Reload with the instrumentation method.
When specified, FriendlyNamereplaces CounterName in Profiling Tools report column names.
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)