Share via


Microsoft.VisualStudio.Profiler Namespace

 

The Microsoft.VisualStudio.Profiler namespace enables you to programmatically control performance data collection from within the application. This approach is useful, for example, if you want to collect performance data in the scope of a function or you want to avoid gathering performance data of a larger framework in which your code is executing. Another example where this approach is useful is, if you want to gather performance data of a specific thread from a group of threads.

These APIs are not supported in Sampling mode for Windows 8 and later versions.

Classes

Class Description
System_CAPS_pubclass DataCollection

The DataCollection class enables you to programmatically control the amount of data collected during profiling in the .vsp file. To programmatically control data collection, use methods and property of the DataCollection class in your managed code.

Enumerations

Enumeration Description
System_CAPS_pubenum MarkOperationResult

CommentMarkAtProfile, CommentMarkProfile, and MarkProfile return success or failure using the MarkOperationResult enum.

System_CAPS_pubenum NameOperationResult

NameProfile method returns NameOperationResult enum to indicate success or failure.

System_CAPS_pubenum ProfileLevel

ProfileLevel enum is used indicate one of the three levels to which performance data collection can be applied.

System_CAPS_pubenum ProfileOperationResult

ResumeProfile, StartProfile, StopProfile, and SuspendProfile return success or failure using the ProfileOperationResult enum.

Remarks

In sampling mode, the following limitations exist:

  1. Suspend/Resume is not supported.

  2. Start/Stop at thread level not supported in sampling mode.

For information on native APIs, see VSPerf.h file.

Return to top