Ejemplo n.º 1
0
        private void OnLowMemory()
        {
            if (!InternalConfig.GetInstance().monitoring_enabled)
            {
                return;
            }

            Elephant.Event("Application_low_memory", MonitoringUtils.GetInstance().GetCurrentLevel());
        }
Ejemplo n.º 2
0
        private void LogMonitoringData()
        {
            _fps = (1f / Time.unscaledDeltaTime);

            if (Time.time > _nextActionTime)
            {
                _nextActionTime += _period;
                MonitoringUtils.GetInstance().LogFps(Math.Round(_fps, 1));
                MonitoringUtils.GetInstance().LogCurrentLevel();
            }
        }
Ejemplo n.º 3
0
        private MonitoringData()
        {
            fpsLogs = new List <double>();
            fpsLogs.AddRange(MonitoringUtils.GetInstance().GetFpsSessionLog());

            currentLevelLog = new List <int>();
            currentLevelLog.AddRange(MonitoringUtils.GetInstance().GetCurrentLevelLog());

            systemMemory = SystemInfo.systemMemorySize;

            MonitoringUtils.GetInstance().Flush();
        }
Ejemplo n.º 4
0
        // iOS only!
        // No-op for Android.
        private void ReportLatestCrashLog()
        {
            if (!InternalConfig.GetInstance().monitoring_enabled)
            {
                return;
            }

            var report = CrashReport.lastReport;

            if (report == null)
            {
                return;
            }

            var parameters = Params.New();

            parameters.Set("time", report.time.ToString(CultureInfo.CurrentCulture));
            parameters.Set("text", report.text);
            Elephant.Event("Application_last_crash_log", MonitoringUtils.GetInstance().GetCurrentLevel(), parameters);
        }
Ejemplo n.º 5
0
 public static void LevelStarted(int level, Params parameters = null)
 {
     MonitoringUtils.GetInstance().SetCurrentLevel(level);
     CustomEvent(LEVEL_STARTED, level, parameters);
 }