This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, use the version selector at the top left. We recommend upgrading to Visual Studio 2019. Download it here

The AutoMark option specifies the number of milliseconds between the collection of Windows software performance counter events. Windows performance counters are specified in the WinCounter option.

Only one AutoMark option can be specified on the command line. Note that the WinCounter sampling interval specified by AutoMark is independent of the main sampling interval.


VSPerfCmd.exe /Start:Method /WinCounter:Path /AutoMark:Milliseconds  


Specifies the number of milliseconds between collections of Windows performance counter events.

Required Options

WinCounter: Path
Specifies the Windows performance counter to collect. When you are using the instrumentation method, multiple Windows counters can be specified. When you are using the sampling method, only one software counter can be specified. The WinCounter option must be specified in a command line that contains the Start option.


In this example, a sampling interval of 1000 milliseconds is set for two Windows performance counters.

VSPerfCmd.exe /Start:Trace /Output:TestApp.exe.vsp /WinCounter:"\Process(*)\% Processor Time" /WinCounter:"\ASP.NET\Pages/sec" /AutoMark:1000  
VSPerfCmd.exe /Launch:TestApp.exe  

See Also

Profiling Stand-Alone Applications
Profiling ASP.NET Web Applications
Profiling Services