How to: Collect Windows counter data
Applies to: Visual Studio Visual 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
Windows Counters are system performance counters that can be collected at set intervals during profiling. In the Marks view of the Profiling Tools report, a row is labeled AutoMark for each collection interval. The row contains columns that describe the performance counter values at that interval. To restrict the analysis to a period of time between two particular marks, select the marks, right-click, and then select Filter By > Marks from the shortcut menu.
Note
Enhanced security features in Windows 8 and Windows Server 2012 required significant changes in the way the Visual Studio profiler collects data on these platforms. UWP apps also require new collection techniques. See Performance Tools on Windows 8 and Windows Server 2012 applications.
To collect Windows counter data
In Performance Explorer, right-click the session for which you want to configure Windows counters and select Properties.
In the Property Pages, click Windows Counters.
Select the Collect Windows Counters check box.
In the Collection interval (msecs) text box, type a time interval.
Select a category from the Counter Category drop-down list.
Select an instance from the Instance drop-down list.
Select the counters you want to use when you profile your application.
Click Apply.
See also
Configure performance sessions Performance session properties CPU and Windows counters