The WinCounter option specifies a Windows or application performance counter to collect at set intervals during the profile run. Windows and application performance counters are listed as marks in the profiling data file. You can specify multiple performance counters to collect in separate options.
By default, counters are collected every 500 milliseconds. Use the AutoMark option to specify a different collection interval.
Only one AutoMark option is used. If multiple AutoMark options are specified, the last one is used.
The WinCounter option can only be used with the Start option.
VSPerfCmd.exe /Start:Method /Wincounter:Path [/WinCounter:Path] [AutoMark:Milliseconds] [Options]
In the following example, two Windows performance counters are specified to be collected at an interval of 1000 milliseconds.
VSPerfCmd.exe /Start:Sample /Output:TestApp.exe.vsp /WinCounter:"\Processor(0)\% Processor Time" /WinCounter:"\System\Context Switches/sec" /AutoMark:1000