OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_IMPL_H_ | 5 #ifndef BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_IMPL_H_ |
6 #define BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_IMPL_H_ | 6 #define BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 170 |
171 #if DCHECK_IS_ON() | 171 #if DCHECK_IS_ON() |
172 // Signaled when all workers have been created. | 172 // Signaled when all workers have been created. |
173 WaitableEvent workers_created_; | 173 WaitableEvent workers_created_; |
174 #endif | 174 #endif |
175 | 175 |
176 // TaskScheduler.DetachDuration.[worker pool name] histogram. Intentionally | 176 // TaskScheduler.DetachDuration.[worker pool name] histogram. Intentionally |
177 // leaked. | 177 // leaked. |
178 HistogramBase* const detach_duration_histogram_; | 178 HistogramBase* const detach_duration_histogram_; |
179 | 179 |
| 180 // TaskScheduler.NumTasksBetweenWaits.[worker pool name] histogram. |
| 181 // Intentionally leaked. |
| 182 HistogramBase* const num_tasks_between_waits_histogram_; |
| 183 |
180 // TaskScheduler.TaskLatency.[worker pool name].[task priority] histograms. | 184 // TaskScheduler.TaskLatency.[worker pool name].[task priority] histograms. |
181 // Indexed by task priority. Histograms are allocated on demand to reduce | 185 // Indexed by task priority. Histograms are allocated on demand to reduce |
182 // memory usage (some task priorities might never run in this | 186 // memory usage (some task priorities might never run in this |
183 // SchedulerThreadPoolImpl). Intentionally leaked. | 187 // SchedulerThreadPoolImpl). Intentionally leaked. |
184 subtle::AtomicWord | 188 subtle::AtomicWord |
185 task_latency_histograms_[static_cast<int>(TaskPriority::HIGHEST) + 1] = | 189 task_latency_histograms_[static_cast<int>(TaskPriority::HIGHEST) + 1] = |
186 {}; | 190 {}; |
187 | 191 |
188 TaskTracker* const task_tracker_; | 192 TaskTracker* const task_tracker_; |
189 DelayedTaskManager* const delayed_task_manager_; | 193 DelayedTaskManager* const delayed_task_manager_; |
190 | 194 |
191 DISALLOW_COPY_AND_ASSIGN(SchedulerWorkerPoolImpl); | 195 DISALLOW_COPY_AND_ASSIGN(SchedulerWorkerPoolImpl); |
192 }; | 196 }; |
193 | 197 |
194 } // namespace internal | 198 } // namespace internal |
195 } // namespace base | 199 } // namespace base |
196 | 200 |
197 #endif // BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_IMPL_H_ | 201 #endif // BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_IMPL_H_ |
OLD | NEW |