Improve perf testing framework
The ANGLERenderTest subclasses have a parameter "iterations". Previously
most of these tests would perform iterations^2 iterations, since the
looping was done both in ANGLERenderTest and in the individual test
classes. Do the looping only in the individual test classes instead.
This enables getting rid of separate beginDrawBenchmark() and
endDrawBenchmark() functions.
Some other unused code is also removed:
1. stepBenchmark function
2. unused parameters to step()
This makes the core loop of running tests simpler.
The perf testing framework also now has shared logic for deciding when
to end a given test.
The score calculation for tests is also changed. Instead of reporting
just the number of operations done, it is reported relative to the actual
run time of the test. This should make the test results more accurate,
since run time of the tests may have some variation. It also enables
changing the run time of the tests without rebaselining them.
In the tests that use GPU, GPU operations are also waited to finish
before stopping the timer.
BUG=angleproject:1261
TEST=angle_perftests
Change-Id: I69e9aad8afd2d9dedd60e144f0a5d4203618feef
Reviewed-on: https://chromium-review.googlesource.com/319381
Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
diff --git a/src/tests/perf_tests/IndexDataManagerTest.cpp b/src/tests/perf_tests/IndexDataManagerTest.cpp
index 40ca085..b6465c0 100644
--- a/src/tests/perf_tests/IndexDataManagerTest.cpp
+++ b/src/tests/perf_tests/IndexDataManagerTest.cpp
@@ -116,7 +116,7 @@
public:
IndexDataManagerPerfTest();
- void step(float dt, double totalTime) override;
+ void step() override;
rx::IndexDataManager mIndexDataManager;
GLsizei mIndexCount;
@@ -151,7 +151,7 @@
mIndexBuffer.bufferData(&indexData[0], indexData.size() * sizeof(GLushort), GL_STATIC_DRAW);
}
-void IndexDataManagerPerfTest::step(float dt, double totalTime)
+void IndexDataManagerPerfTest::step()
{
rx::TranslatedIndexData translatedIndexData;
rx::SourceIndexData sourceIndexData;
@@ -162,11 +162,6 @@
mIndexDataManager.prepareIndexData(GL_UNSIGNED_SHORT, mIndexCount, &mIndexBuffer, nullptr,
&translatedIndexData, &sourceIndexData, false);
}
-
- if (mTimer->getElapsedTime() >= 5.0)
- {
- mRunning = false;
- }
}
TEST_F(IndexDataManagerPerfTest, Run)