Commit 82b216a0 authored by alokp@chromium.org's avatar alokp@chromium.org

cc: Added modifier string to clarify perf tests.

A few perf tests were writing results against the same measurement name making it impossible to distinguish and compare measurements. This patch adds modifier strings to make the measurments clear.

BUG=343684

Review URL: https://codereview.chromium.org/167753003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252118 0039d316-1c4b-4281-b951-d872f2087c98
parent d4be619e
......@@ -244,7 +244,7 @@ class RasterWorkerPoolPerfTest
RunMessageLoopUntilAllTasksHaveCompleted();
perf_test::PrintResult("schedule_tasks",
"",
TestModifierString(),
test_name,
timer_.LapsPerSecond(),
"runs/s",
......@@ -282,7 +282,7 @@ class RasterWorkerPoolPerfTest
RunMessageLoopUntilAllTasksHaveCompleted();
perf_test::PrintResult("schedule_alternate_tasks",
"",
TestModifierString(),
test_name,
timer_.LapsPerSecond(),
"runs/s",
......@@ -314,7 +314,7 @@ class RasterWorkerPoolPerfTest
RunMessageLoopUntilAllTasksHaveCompleted();
perf_test::PrintResult("schedule_and_execute_tasks",
"",
TestModifierString(),
test_name,
timer_.LapsPerSecond(),
"runs/s",
......@@ -322,6 +322,19 @@ class RasterWorkerPoolPerfTest
}
private:
std::string TestModifierString() const {
switch (GetParam()) {
case RASTER_WORKER_POOL_TYPE_PIXEL_BUFFER:
return std::string("_pixel_raster_worker_pool");
case RASTER_WORKER_POOL_TYPE_IMAGE:
return std::string("_image_raster_worker_pool");
case RASTER_WORKER_POOL_TYPE_DIRECT:
return std::string("_direct_raster_worker_pool");
}
NOTREACHED();
return std::string();
}
scoped_refptr<TestContextProvider> context_provider_;
FakeOutputSurfaceClient output_surface_client_;
scoped_ptr<FakeOutputSurface> output_surface_;
......
......@@ -80,7 +80,7 @@ class TaskGraphRunnerPerfTest : public testing::Test {
} while (!timer_.HasTimeLimitExpired());
perf_test::PrintResult("build_task_graph",
"",
TestModifierString(),
test_name,
timer_.LapsPerSecond(),
"runs/s",
......@@ -119,7 +119,7 @@ class TaskGraphRunnerPerfTest : public testing::Test {
CollectCompletedTasks(&completed_tasks);
perf_test::PrintResult("schedule_tasks",
"",
TestModifierString(),
test_name,
timer_.LapsPerSecond(),
"runs/s",
......@@ -165,7 +165,7 @@ class TaskGraphRunnerPerfTest : public testing::Test {
CollectCompletedTasks(&completed_tasks);
perf_test::PrintResult("schedule_alternate_tasks",
"",
TestModifierString(),
test_name,
timer_.LapsPerSecond(),
"runs/s",
......@@ -203,11 +203,19 @@ class TaskGraphRunnerPerfTest : public testing::Test {
timer_.NextLap();
} while (!timer_.HasTimeLimitExpired());
perf_test::PrintResult(
"execute_tasks", "", test_name, timer_.LapsPerSecond(), "runs/s", true);
perf_test::PrintResult("execute_tasks",
TestModifierString(),
test_name,
timer_.LapsPerSecond(),
"runs/s",
true);
}
private:
static std::string TestModifierString() {
return std::string("_task_graph_runner");
}
void CreateTasks(int num_tasks, PerfTaskImpl::Vector* tasks) {
for (int i = 0; i < num_tasks; ++i)
tasks->push_back(make_scoped_refptr(new PerfTaskImpl));
......
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