summaryrefslogtreecommitdiffstats
path: root/cc/resources/task_graph_runner_perftest.cc
diff options
context:
space:
mode:
authorreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-23 19:16:08 +0000
committerreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-23 19:16:08 +0000
commitba2d7202b54cf572fa8bc142f25d745d6f02a7b8 (patch)
tree72a78bc0aa1fce6bf56ee6aafaa76c64550d8585 /cc/resources/task_graph_runner_perftest.cc
parent9239edd09de2d37b975405623c4fa1c2359a75fb (diff)
downloadchromium_src-ba2d7202b54cf572fa8bc142f25d745d6f02a7b8.zip
chromium_src-ba2d7202b54cf572fa8bc142f25d745d6f02a7b8.tar.gz
chromium_src-ba2d7202b54cf572fa8bc142f25d745d6f02a7b8.tar.bz2
cc: Clang-format cc/resources/task_graph_runner_perftest.cc code.
Style-change only. BUG= TBR=vmpstr NOTRY=true Review URL: https://codereview.chromium.org/145953003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246660 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/resources/task_graph_runner_perftest.cc')
-rw-r--r--cc/resources/task_graph_runner_perftest.cc44
1 files changed, 20 insertions, 24 deletions
diff --git a/cc/resources/task_graph_runner_perftest.cc b/cc/resources/task_graph_runner_perftest.cc
index 57e5f82..5e952a3 100644
--- a/cc/resources/task_graph_runner_perftest.cc
+++ b/cc/resources/task_graph_runner_perftest.cc
@@ -40,13 +40,9 @@ class PerfControlTaskImpl : public internal::Task {
can_finish_.Wait();
}
- void WaitForTaskToStartRunning() {
- did_start_.Wait();
- }
+ void WaitForTaskToStartRunning() { did_start_.Wait(); }
- void AllowTaskToFinish() {
- can_finish_.Signal();
- }
+ void AllowTaskToFinish() { can_finish_.Signal(); }
private:
virtual ~PerfControlTaskImpl() {}
@@ -62,24 +58,20 @@ class TaskGraphRunnerPerfTest : public testing::Test {
TaskGraphRunnerPerfTest()
: timer_(kWarmupRuns,
base::TimeDelta::FromMilliseconds(kTimeLimitMillis),
- kTimeCheckInterval) {
- }
+ kTimeCheckInterval) {}
// Overridden from testing::Test:
virtual void SetUp() OVERRIDE {
- task_graph_runner_ = make_scoped_ptr(
- new internal::TaskGraphRunner(1, "PerfTest"));
+ task_graph_runner_ =
+ make_scoped_ptr(new internal::TaskGraphRunner(1, "PerfTest"));
namespace_token_ = task_graph_runner_->GetNamespaceToken();
}
- virtual void TearDown() OVERRIDE {
- task_graph_runner_.reset();
- }
+ virtual void TearDown() OVERRIDE { task_graph_runner_.reset(); }
void AfterTest(const std::string& test_name) {
// Format matches chrome/test/perf/perf_test.h:PrintResult
- printf("*RESULT %s: %.2f runs/s\n",
- test_name.c_str(),
- timer_.LapsPerSecond());
+ printf(
+ "*RESULT %s: %.2f runs/s\n", test_name.c_str(), timer_.LapsPerSecond());
}
void RunScheduleTasksTest(const std::string& test_name,
@@ -94,13 +86,17 @@ class TaskGraphRunnerPerfTest : public testing::Test {
leaf_task->AllowTaskToFinish();
task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_);
internal::Task::Vector completed_tasks;
- task_graph_runner_->CollectCompletedTasks(
- namespace_token_, &completed_tasks);
+ task_graph_runner_->CollectCompletedTasks(namespace_token_,
+ &completed_tasks);
timer_.NextLap();
} while (!timer_.HasTimeLimitExpired());
- perf_test::PrintResult("schedule_tasks", "", test_name,
- timer_.LapsPerSecond(), "runs/s", true);
+ perf_test::PrintResult("schedule_tasks",
+ "",
+ test_name,
+ timer_.LapsPerSecond(),
+ "runs/s",
+ true);
}
void RunExecuteTasksTest(const std::string& test_name,
@@ -111,13 +107,13 @@ class TaskGraphRunnerPerfTest : public testing::Test {
ScheduleTasks(NULL, NULL, max_depth, num_children_per_node);
task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_);
internal::Task::Vector completed_tasks;
- task_graph_runner_->CollectCompletedTasks(
- namespace_token_, &completed_tasks);
+ task_graph_runner_->CollectCompletedTasks(namespace_token_,
+ &completed_tasks);
timer_.NextLap();
} while (!timer_.HasTimeLimitExpired());
- perf_test::PrintResult("execute_tasks", "", test_name,
- timer_.LapsPerSecond(), "runs/s", true);
+ perf_test::PrintResult(
+ "execute_tasks", "", test_name, timer_.LapsPerSecond(), "runs/s", true);
}
private: