private static void HandleEditorStartedCompiling()
        {
            UnityScripsCompileTimeTracker._Data.StartTime = TrackingUtils.GetMilliseconds();

            UnityConsoleCountsByType countsByType = UnityEditorConsoleUtils.GetCountsByType();

            UnityScripsCompileTimeTracker.StoredErrorCount = countsByType.errorCount;
        }
        private static void HandleEditorFinishedCompiling()
        {
            int elapsedTime = TrackingUtils.GetMilliseconds() - UnityScripsCompileTimeTracker._Data.StartTime;

            UnityConsoleCountsByType countsByType = UnityEditorConsoleUtils.GetCountsByType();
            bool hasErrors = (countsByType.errorCount - UnityScripsCompileTimeTracker.StoredErrorCount) > 0;

            UnityScripsCompileTimeKeyframe keyframe = new UnityScripsCompileTimeKeyframe(elapsedTime, hasErrors);

            UnityScripsCompileTimeTracker._Data.AddCompileTimeKeyframe(keyframe);
            UnityScripsCompileTimeTracker.KeyframeAdded.Invoke(keyframe);
        }
        public static UnityConsoleCountsByType GetCountsByType()
        {
            UnityConsoleCountsByType countsByType = new UnityConsoleCountsByType();

            if (UnityEditorConsoleUtils._getCountsByTypeMethod == null)
            {
                Debug.LogError("Failed to find LogEntries.GetCountsByType method info!");
                return(countsByType);
            }

            object[] arguments = new object[] { 0, 0, 0 };
            UnityEditorConsoleUtils._getCountsByTypeMethod.Invoke(null, arguments);

            countsByType.errorCount   = (int)arguments[0];
            countsByType.warningCount = (int)arguments[1];
            countsByType.logCount     = (int)arguments[2];

            return(countsByType);
        }