Ejemplo n.º 1
0
        private void StartTrackerProfiling(Button btn, string trackerId, bool deepProfile, bool editorProfile)
        {
            if (!ProfilerHelpers.StartProfilerRecording(trackerId, editorProfile, deepProfile))
            {
                return;
            }

            m_CurrentProfileTag = trackerId;
            UpdateActionButton(btn, trackerId);
        }
Ejemplo n.º 2
0
        private static WindowAction StartProfilerRecordingEditorAction()
        {
            var action = WindowAction.CreateWindowMenuItem("StartProfilerRecordingEditor", (window, _action) =>
            {
                // We need to fix this!! See

                var marker = PerformanceTrackerMonitoringService.GetWindowPaintMarker(window);
                ProfilerHelpers.OpenProfiler(marker, profilerWindow =>
                {
                    ProfilerHelpers.SetRecordingEnabled(profilerWindow, true);
                    ProfilerHelpers.StartProfilerRecording("", true, ProfilerDriver.deepProfiling);
                });
            }, "Window Performance/Start Profiler Recording");

            return(action);
        }