Commit 557a1ee4 by Jamie Madill Committed by Commit Bot

Make perf tests faster in correctness-only mode.

When running with "--one-frame-only" we can also skip the test warmup. Also we can reduce the internal iteration count to 1 to make the tests as fast as possible. Bug: angleproject:2923 Change-Id: I2f82ae0dd237767ea7b15074e459ed1094ba9943 Reviewed-on: https://chromium-review.googlesource.com/c/1308737Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 9a79c889
......@@ -261,11 +261,19 @@ std::string RenderTestParams::suffix() const
}
ANGLERenderTest::ANGLERenderTest(const std::string &name, const RenderTestParams &testParams)
: ANGLEPerfTest(name, testParams.suffix(), testParams.iterationsPerStep),
: ANGLEPerfTest(name,
testParams.suffix(),
g_OnlyOneRunFrame ? 1 : testParams.iterationsPerStep),
mTestParams(testParams),
mEGLWindow(createEGLWindow(testParams)),
mOSWindow(nullptr)
{
// Force fast tests to make sure our slowest bots don't time out.
if (g_OnlyOneRunFrame)
{
const_cast<RenderTestParams &>(testParams).iterationsPerStep = 1;
}
// Try to ensure we don't trigger allocation during execution.
mTraceEventBuffer.reserve(kInitialTraceEventBufferSize);
}
......@@ -335,9 +343,12 @@ void ANGLERenderTest::SetUp()
}
// Warm up the benchmark to reduce variance.
for (size_t iteration = 0; iteration < kWarmupIterations; ++iteration)
if (!g_OnlyOneRunFrame)
{
drawBenchmark();
for (size_t iteration = 0; iteration < kWarmupIterations; ++iteration)
{
drawBenchmark();
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment