Add cpu time measurement to perf tests

Bug: angleproject:6667
Change-Id: I16570a7b51d363dd1c0f35789b985520cb76d488
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270601
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
This commit is contained in:
Lingfeng Yang
2021-11-09 18:13:15 -08:00
committed by Angle LUCI CQ
parent 30c03b56b5
commit e9f9fa17da
17 changed files with 169 additions and 45 deletions

View File

@@ -234,7 +234,7 @@ int SampleApplication::run()
while (mRunning)
{
double elapsedTime = mTimer.getElapsedTime();
double elapsedTime = mTimer.getElapsedWallClockTime();
double deltaTime = elapsedTime - prevTime;
step(static_cast<float>(deltaTime), elapsedTime);
@@ -277,7 +277,7 @@ int SampleApplication::run()
if (mFrameCount % 100 == 0)
{
printf("Rate: %0.2lf frames / second\n",
static_cast<double>(mFrameCount) / mTimer.getElapsedTime());
static_cast<double>(mFrameCount) / mTimer.getElapsedWallClockTime());
}
}