共用方式為


AutoMark

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. 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.

Syntax

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

Parameters

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.

Example

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