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 "content/child/scheduler/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 "content/child/scheduler/scheduler_message_loop_delegate.h" | 9 #include "components/scheduler/child/scheduler_message_loop_delegate.h" |
10 #include "content/child/scheduler/task_queue_selector.h" | 10 #include "components/scheduler/child/task_queue_selector.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "testing/perf/perf_test.h" | 12 #include "testing/perf/perf_test.h" |
13 | 13 |
14 namespace content { | 14 namespace scheduler { |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 class SelectorForTest : public TaskQueueSelector { | 18 class SelectorForTest : public TaskQueueSelector { |
19 public: | 19 public: |
20 SelectorForTest() {} | 20 SelectorForTest() {} |
21 | 21 |
22 void RegisterWorkQueues( | 22 void RegisterWorkQueues( |
23 const std::vector<const base::TaskQueue*>& work_queues) override { | 23 const std::vector<const base::TaskQueue*>& work_queues) override { |
24 work_queues_ = work_queues; | 24 work_queues_ = work_queues; |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 165 |
166 max_tasks_in_flight_ = 200; | 166 max_tasks_in_flight_ = 200; |
167 Benchmark("run 10000 delayed tasks with eight queues", | 167 Benchmark("run 10000 delayed tasks with eight queues", |
168 base::Bind(&TaskQueueManagerPerfTest::ResetAndCallTestDelayedTask, | 168 base::Bind(&TaskQueueManagerPerfTest::ResetAndCallTestDelayedTask, |
169 base::Unretained(this), 10000)); | 169 base::Unretained(this), 10000)); |
170 } | 170 } |
171 | 171 |
172 // TODO(alexclarke): Add additional tests with different mixes of non-delayed vs | 172 // TODO(alexclarke): Add additional tests with different mixes of non-delayed vs |
173 // delayed tasks. | 173 // delayed tasks. |
174 | 174 |
175 } // namespace content | 175 } // namespace scheduler |
OLD | NEW |