Exemplo n.º 1
0
    private IEnumerator runTest(TestData pData)
    {
        log("Preparing new text...", "yellow");

        TestData testData = new TestData(pData);

        _objectSpawner.CleanObjects();

        yield return(new WaitForSeconds(1));

        yield return(new WaitUntil(() => _objectSpawner.GenerateObjectGrid(testData.gridSize, testData.type))); // Generate object grid

        testData.trisCount = _objectSpawner.GetTrisCount();

        yield return(new WaitForSeconds(5)); // Give it some extra time to load

        log("Next test: " + testData.testDescription, "yellow");

        // Recording test
        _performanceLogger.StartRecording();
        yield return(new WaitForSeconds(testData.testDurationSeconds));

        _performanceLogger.StopRecording();

        // Save test results
        testData.frameData = _performanceLogger.getFpsLog();
        _testResults.Add(testData);

        RunNextTest();
    }