public static void OpenProfiler(string marker = "", Analytics.ActionSource source = Analytics.ActionSource.Scripting) { Analytics.SendPerformanceActionEvent(new Analytics.PerformanceActionEvent( Analytics.ActionType.OpenProfilerOnMarker, marker, source)); ProfilerHelpers.OpenProfiler(marker); }
public static void LogCallstack(string marker, Analytics.ActionSource source = Analytics.ActionSource.Scripting) { Analytics.SendPerformanceActionEvent(new Analytics.PerformanceActionEvent( Analytics.ActionType.LogCallstack, marker, source)); GetCallstack(marker, callstack => Debug.Log(callstack), true); }
public static void StopProfilerRecordingAndCreateReport(string profileTitle, Analytics.ActionSource source = Analytics.ActionSource.Scripting) { ProfilerHelpers.StopProfilerRecordingAndCreateReport(profileTitle); Analytics.SendPerformanceActionEvent(new Analytics.PerformanceActionEvent( ProfilerDriver.deepProfiling ? Analytics.ActionType.DeedProfile : Analytics.ActionType.Profile, profileTitle, source )); }
public static void OpenBugReportingTool(string marker, Analytics.ActionSource source = Analytics.ActionSource.Scripting) { Analytics.SendPerformanceActionEvent(new Analytics.PerformanceActionEvent( Analytics.ActionType.LogPerformanceBug, marker, source)); var options = new TrackerReportOptions(); options.showSamples = true; options.showPeak = true; options.showAvg = true; options.showTotal = true; options.sort = true; options.sortBy = ColumnId.PeakTime; options.sortAsc = false; var report = PerformanceTrackerReportUtils.GetAllTrackersReport(options); var reportFilePath = SavePerformanceTrackerReport(report); var descriptionBuilder = new StringBuilder(); descriptionBuilder.AppendLine("1. What is slow (complete performance tracker report attached)"); if (!string.IsNullOrEmpty(marker)) { options.trackerFilter = $"^{marker}$"; var markerReport = PerformanceTrackerReportUtils.GetTrackersReport(options); descriptionBuilder.AppendLine(); descriptionBuilder.AppendLine(markerReport); } descriptionBuilder.AppendLine(); descriptionBuilder.Append("2. How we can reproduce it using the example you attached"); var myAssets = new[] { GetFullPath(reportFilePath) }; BugReporterUtils.OpenBugReporter(descriptionBuilder.ToString(), myAssets); }
public static void OpenProfileReport(string profileDataPath, string searchString = "", Analytics.ActionSource source = Analytics.ActionSource.Scripting) { Analytics.SendPerformanceActionEvent(new Analytics.PerformanceActionEvent( Analytics.ActionType.OpenProfilerData, searchString, source)); ProfilerHelpers.OpenProfileReport(profileDataPath, searchString); }
public static void AddNewPerformanceNotification(string marker, float threshold = 500, Analytics.ActionSource source = Analytics.ActionSource.Scripting) { Analytics.SendPerformanceActionEvent(new Analytics.PerformanceActionEvent( Analytics.ActionType.AddNotification, marker, source)); var collection = PerformanceTrackerSettings.LoadPerformanceNotificationCollection(); PerformanceTrackerSettings.AddPerformanceNotification(collection, new PerformanceNotification() { enabled = true, name = marker, threshold = threshold }); PerformanceTrackerSettings.SavePerformanceNotificationCollection(collection); SettingsService.OpenUserPreferences(PerformanceTrackerSettings.settingsKey); SettingsService.NotifySettingsProviderChanged(); }
public static PerformanceTrackerWindow OpenPerformanceTrackerWindow(string marker, Analytics.ActionSource source = Analytics.ActionSource.Scripting) { Analytics.SendPerformanceActionEvent(new Analytics.PerformanceActionEvent( Analytics.ActionType.OpenPerformanceTrackerViewer, marker, source)); var window = EditorWindow.GetWindow <PerformanceTrackerWindow>(); window.Show(); window.SetSearchString(""); window.SetSearchString(marker); return(window); }