Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4101)

Unified Diff: cc/resources/task_graph_runner_perftest.cc

Issue 943813002: cc: Add TaskGraphRunner sub-namespaces with task concurrency limits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/resources/task_graph_runner_perftest.cc
diff --git a/cc/resources/task_graph_runner_perftest.cc b/cc/resources/task_graph_runner_perftest.cc
index cbd5c5cfc6cacaf77ab36ae23efea597094853ae..b31cc904add865cb2fa3be060f11f3b0940211d7 100644
--- a/cc/resources/task_graph_runner_perftest.cc
+++ b/cc/resources/task_graph_runner_perftest.cc
@@ -228,16 +228,22 @@ class TaskGraphRunnerPerfTest : public testing::Test {
DCHECK(graph->nodes.empty());
DCHECK(graph->edges.empty());
+ int sub_namespace = 0;
+ int max_concurrent_tasks = 4;
+
for (PerfTaskImpl::Vector::const_iterator it = leaf_tasks.begin();
it != leaf_tasks.end();
++it) {
- graph->nodes.push_back(TaskGraph::Node(it->get(), 0u, 0u));
+ graph->nodes.push_back(TaskGraph::Node(it->get(), 0u, 0u, sub_namespace,
+ max_concurrent_tasks));
}
for (PerfTaskImpl::Vector::const_iterator it = tasks.begin();
it != tasks.end();
++it) {
- graph->nodes.push_back(TaskGraph::Node(it->get(), 0u, leaf_tasks.size()));
+ graph->nodes.push_back(TaskGraph::Node(it->get(), 0u, leaf_tasks.size(),
+ sub_namespace,
+ max_concurrent_tasks));
for (PerfTaskImpl::Vector::const_iterator leaf_it = leaf_tasks.begin();
leaf_it != leaf_tasks.end();
@@ -256,7 +262,8 @@ class TaskGraphRunnerPerfTest : public testing::Test {
for (PerfTaskImpl::Vector::const_iterator it = top_level_tasks.begin();
it != top_level_tasks.end();
++it) {
- graph->nodes.push_back(TaskGraph::Node(it->get(), 0u, tasks.size()));
+ graph->nodes.push_back(TaskGraph::Node(
+ it->get(), 0u, tasks.size(), sub_namespace, max_concurrent_tasks));
}
}

Powered by Google App Engine
This is Rietveld 408576698