Ejemplo n.º 1
0
 private void logSceneFPS()
 {
     Disney.Kelowna.Common.Performance.Metric <float> framesPerSecond = perf.FramesPerSecond;
     LogAction("fps_min", Mathf.RoundToInt(framesPerSecond.Min).ToString(), SceneManager.GetActiveScene().name);
     LogAction("fps_max", Mathf.RoundToInt(framesPerSecond.Max).ToString(), SceneManager.GetActiveScene().name);
     LogAction("fps_average", Mathf.RoundToInt((float)framesPerSecond.Average).ToString(), SceneManager.GetActiveScene().name);
 }
Ejemplo n.º 2
0
 private void initializeMetric()
 {
     if (!string.IsNullOrEmpty(data.MetricName))
     {
         Disney.Kelowna.Common.Performance performance = Service.Get <Disney.Kelowna.Common.Performance>();
         releasedMetric = performance.GetMetric <int>(data.MetricName);
         if (releasedMetric == null)
         {
             releasedMetric = new Disney.Kelowna.Common.Performance.Metric <int>(data.MetricName, data.MetricName + ": {0:0}", null, 1uL);
             performance.AddMetric(releasedMetric);
         }
         releasedMetric.ResetValues();
     }
 }