ProfileLevel Enumeration
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

ProfileLevel Enumeration

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

Namespace: Microsoft.VisualStudio.Profiler
Assembly: Microsoft.VisualStudio.Profiler (in microsoft.visualstudio.profiler.dll)

public enum ProfileLevel
public enum ProfileLevel
public enum ProfileLevel

 Member nameDescription
GlobalGlobal level setting affects all processes and threads in the profiling run. 
ProcessProcess level setting affect all threads which are part of specified process. 
ThreadThread profiling Level setting affects the specified thread. 

The following code illustrates the ProfileLevel enumeration. The example uses the ProfileLevel value of Global in a call to the DataCollection.StartProfile method.

        public void ExerciseStartProfile()
            // Declare enumeration to hold return value of 
            // the call to StartProfile.
            ProfileOperationResult profileResult;

            profileResult = DataCollection.StartProfile(

            Console.WriteLine("StartProfile returned {0}", profileResult);
© 2016 Microsoft