ProfileLevel 列舉型別
ProfileLevel 列舉是用來指定三個層級的其中一個可套用效能資料集合的層級。
命名空間: Microsoft.VisualStudio.Profiler
組件: Microsoft.VisualStudio.Profiler (在 Microsoft.VisualStudio.Profiler.dll 中)
語法
'宣告
Public Enumeration ProfileLevel
public enum ProfileLevel
public enum class ProfileLevel
type ProfileLevel
public enum ProfileLevel
成員
成員名稱 | 說明 | |
---|---|---|
Thread | 執行緒分析層級設定會影響指定的執行緒。 | |
Process | 處理序層級設定會影響屬於指定之處理序的一部分的所有執行緒。 | |
Global | 全域層級設定會影響程式碼剖析回合中的所有處理序和執行緒。 |
範例
下列程式碼將說明 ProfileLevel 列舉。 這個範例會在 DataCollection.StartProfile 方法的呼叫中使用 Global 的 ProfileLevel 值。
public void ExerciseStartProfile()
{
// Declare enumeration to hold return value of
// the call to StartProfile.
ProfileOperationResult profileResult;
profileResult = DataCollection.StartProfile(
ProfileLevel.Global,
DataCollection.CurrentId);
Console.WriteLine("StartProfile returned {0}", profileResult);
}