Commit 974c2371 by Jamie Madill Committed by Commit Bot

Perf Tests: Run at least 1 step.

We could end up in some very slow scenes (e.g. when debugging). This could produce a step count of zero which doesn't make sense. Noticed while capturing the T-Rex replay. Bug: angleproject:5134 Change-Id: Ibf2439961dfb3c01649dcab37acead7b6e2ab345 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2449160 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com>
parent bc4ec4c1
...@@ -358,6 +358,7 @@ void ANGLEPerfTest::calibrateStepsToRun() ...@@ -358,6 +358,7 @@ void ANGLEPerfTest::calibrateStepsToRun()
// Scale steps down according to the time that exeeded one second. // Scale steps down according to the time that exeeded one second.
double scale = gTestTimeSeconds / elapsedTime; double scale = gTestTimeSeconds / elapsedTime;
mStepsToRun = static_cast<unsigned int>(static_cast<double>(mNumStepsPerformed) * scale); mStepsToRun = static_cast<unsigned int>(static_cast<double>(mNumStepsPerformed) * scale);
mStepsToRun = std::max(1, mStepsToRun);
if (gVerboseLogging) if (gVerboseLogging)
{ {
......
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