public PerformanceProfile(string sdkPath, string resultsDirectory) : base(resultsDirectory) { var saveSnapshotProfilingConfig = new SaveSnapshotProfilingConfig { ProfilingControlKind = ProfilingControlKind.Api, TempDir = Path.GetTempPath(), SaveDir = resultsDirectory, RedistDir = sdkPath, ProfilingType = ProfilingType.Performance, ListFile = this.ListFile, SnapshotFormat = SnapshotFormat.Uncompressed }; while (SelfAttach.State != SelfApiState.None) { Thread.Sleep(250); } SelfAttach.Attach(saveSnapshotProfilingConfig); this.WaitForProfilerToAttachToProcess(); if (PerformanceProfiler.IsActive) { PerformanceProfiler.Begin(); PerformanceProfiler.Start(); } }
public MemoryProfile(string sdkPath, string resultsDirectory) : base(resultsDirectory) { var saveSnapshotProfilingConfig = new SaveSnapshotProfilingConfig { ProfilingControlKind = ProfilingControlKind.Api, TempDir = Path.GetTempPath(), SaveDir = resultsDirectory, RedistDir = sdkPath, ProfilingType = ProfilingType.Memory, ListFile = this.ListFile }; while (SelfAttach.State != SelfApiState.None) { Thread.Sleep(250); } SelfAttach.Attach(saveSnapshotProfilingConfig); this.WaitForProfilerToAttachToProcess(); if (MemoryProfiler.IsActive && MemoryProfiler.CanControlAllocations) { MemoryProfiler.EnableAllocations(); } }
public TimelineProfile(string sdkPath, string resultsDirectory) : base(resultsDirectory) { var saveSnapshotProfilingConfig = new SaveSnapshotProfilingConfig { ProfilingControlKind = ProfilingControlKind.Api, TempDir = Path.GetTempPath(), SaveDir = resultsDirectory, RedistDir = sdkPath, ProfilingType = ProfilingType.Timeline, ListFile = ListFile, SnapshotFormat = SnapshotFormat.Uncompressed }; SelfAttach.Attach(saveSnapshotProfilingConfig); WaitForProfilerToAttachToProcess(); if (TimelineProfiler.IsActive) { TimelineProfiler.Begin(); } }