OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/scheduler/child/task_queue_manager.h" | 5 #include "components/scheduler/child/task_queue_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/threading/thread.h" | 8 #include "base/threading/thread.h" |
9 #include "components/scheduler/child/scheduler_message_loop_delegate.h" | 9 #include "components/scheduler/child/scheduler_message_loop_delegate.h" |
| 10 #include "components/scheduler/child/task_queue.h" |
10 #include "components/scheduler/child/task_queue_selector.h" | 11 #include "components/scheduler/child/task_queue_selector.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "testing/perf/perf_test.h" | 13 #include "testing/perf/perf_test.h" |
13 | 14 |
14 namespace scheduler { | 15 namespace scheduler { |
15 | 16 |
16 namespace { | 17 namespace { |
17 | 18 |
18 class SelectorForTest : public TaskQueueSelector { | 19 class SelectorForTest : public TaskQueueSelector { |
19 public: | 20 public: |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 max_tasks_in_flight_ = 200; | 167 max_tasks_in_flight_ = 200; |
167 Benchmark("run 10000 delayed tasks with eight queues", | 168 Benchmark("run 10000 delayed tasks with eight queues", |
168 base::Bind(&TaskQueueManagerPerfTest::ResetAndCallTestDelayedTask, | 169 base::Bind(&TaskQueueManagerPerfTest::ResetAndCallTestDelayedTask, |
169 base::Unretained(this), 10000)); | 170 base::Unretained(this), 10000)); |
170 } | 171 } |
171 | 172 |
172 // TODO(alexclarke): Add additional tests with different mixes of non-delayed vs | 173 // TODO(alexclarke): Add additional tests with different mixes of non-delayed vs |
173 // delayed tasks. | 174 // delayed tasks. |
174 | 175 |
175 } // namespace scheduler | 176 } // namespace scheduler |
OLD | NEW |