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

Side by Side Diff: components/scheduler/child/scheduler_helper.cc

Issue 1898233002: Report expected task queueing time via UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove export. Fix windows. Created 4 years, 5 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 unified diff | Download patch
OLDNEW
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/scheduler_helper.h" 5 #include "components/scheduler/child/scheduler_helper.h"
6 6
7 #include "base/time/default_tick_clock.h" 7 #include "base/time/default_tick_clock.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "base/trace_event/trace_event_argument.h" 9 #include "base/trace_event/trace_event_argument.h"
10 #include "components/scheduler/base/task_queue_impl.h" 10 #include "components/scheduler/base/task_queue_impl.h"
(...skipping 14 matching lines...) Expand all
25 disabled_by_default_verbose_tracing_category)), 25 disabled_by_default_verbose_tracing_category)),
26 control_task_runner_(NewTaskQueue( 26 control_task_runner_(NewTaskQueue(
27 TaskQueue::Spec("control_tq") 27 TaskQueue::Spec("control_tq")
28 .SetWakeupPolicy(TaskQueue::WakeupPolicy::DONT_WAKE_OTHER_QUEUES) 28 .SetWakeupPolicy(TaskQueue::WakeupPolicy::DONT_WAKE_OTHER_QUEUES)
29 .SetShouldNotifyObservers(false))), 29 .SetShouldNotifyObservers(false))),
30 control_after_wakeup_task_runner_(NewTaskQueue( 30 control_after_wakeup_task_runner_(NewTaskQueue(
31 TaskQueue::Spec("control_after_wakeup_tq") 31 TaskQueue::Spec("control_after_wakeup_tq")
32 .SetPumpPolicy(TaskQueue::PumpPolicy::AFTER_WAKEUP) 32 .SetPumpPolicy(TaskQueue::PumpPolicy::AFTER_WAKEUP)
33 .SetWakeupPolicy(TaskQueue::WakeupPolicy::DONT_WAKE_OTHER_QUEUES) 33 .SetWakeupPolicy(TaskQueue::WakeupPolicy::DONT_WAKE_OTHER_QUEUES)
34 .SetShouldNotifyObservers(false))), 34 .SetShouldNotifyObservers(false))),
35 default_task_runner_(NewTaskQueue(TaskQueue::Spec("default_tq") 35 default_task_runner_(NewTaskQueue(
36 .SetShouldMonitorQuiescence(true))), 36 TaskQueue::Spec("default_tq").SetShouldMonitorQuiescence(true))),
37 observer_(nullptr), 37 observer_(nullptr),
38 tracing_category_(tracing_category), 38 tracing_category_(tracing_category),
39 disabled_by_default_tracing_category_( 39 disabled_by_default_tracing_category_(
40 disabled_by_default_tracing_category) { 40 disabled_by_default_tracing_category) {
41 control_task_runner_->SetQueuePriority(TaskQueue::CONTROL_PRIORITY); 41 control_task_runner_->SetQueuePriority(TaskQueue::CONTROL_PRIORITY);
42 control_after_wakeup_task_runner_->SetQueuePriority( 42 control_after_wakeup_task_runner_->SetQueuePriority(
43 TaskQueue::CONTROL_PRIORITY); 43 TaskQueue::CONTROL_PRIORITY);
44 44
45 task_queue_manager_->SetWorkBatchSize(4); 45 task_queue_manager_->SetWorkBatchSize(4);
46 46
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 observer_->OnTriedToExecuteBlockedTask(queue, task); 155 observer_->OnTriedToExecuteBlockedTask(queue, task);
156 } 156 }
157 157
158 TaskQueue* SchedulerHelper::CurrentlyExecutingTaskQueue() const { 158 TaskQueue* SchedulerHelper::CurrentlyExecutingTaskQueue() const {
159 if (!task_queue_manager_) 159 if (!task_queue_manager_)
160 return nullptr; 160 return nullptr;
161 return task_queue_manager_->currently_executing_task_queue(); 161 return task_queue_manager_->currently_executing_task_queue();
162 } 162 }
163 163
164 } // namespace scheduler 164 } // namespace scheduler
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698