Example #1
0
        private string GenerateLevelReport(PerformanceProfiler.PerformanceData data)
        {
            string result = "\nLevel: " + levelDir.levels[data.levelIndex].name;

            result += "\n-----------------------------------";
            result += "\nfps: " + data.fps;
            result += "\nFrame Time: (" + data.minFrameTime;
            result += " - " + data.maxFrameTime + ")";
            result += "\nMean: " + data.meanFrameTime;
            result += "\nMedian: " + data.medianFrameTime;
            result += "\nStd Dev: " + data.frameTimeStdDev;
            result += "\nTotal Time: " + data.totalTime;
            result += "\nSamples: " + data.totalSamples;
            return(result);
        }
Example #2
0
 // When we get back from the gameplay state, load the next map and continue.
 public override void Resume(StateExitValue results)
 {
     profiler.Finish();
     PerformanceProfiler.PerformanceData data = profiler.GetDataSnapshot();
     data.levelIndex = nextLevelIndex;
     performanceData.Add(data);
     if (!StartNextLevel())
     {
         Debug.Log(GenerateFullReport());
         manager.SwapState(new BasicDialog("Tests completed."));
     }
     else
     {
         Debug.Log(GenerateLevelReport(data));
     }
 }