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

Unified Diff: components/scheduler/base/task_queue_manager.h

Issue 1898233002: Report expected task queueing time via UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: RenderSchedulerImpl owns all the things. 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 side-by-side diff with in-line comments
Download patch
Index: components/scheduler/base/task_queue_manager.h
diff --git a/components/scheduler/base/task_queue_manager.h b/components/scheduler/base/task_queue_manager.h
index 1e9eef4d2819447ae41d96387b56857ee5519f91..a871481ae0020a8cbf355cd758d0c23f4db44714 100644
--- a/components/scheduler/base/task_queue_manager.h
+++ b/components/scheduler/base/task_queue_manager.h
@@ -38,6 +38,7 @@ class LazyNow;
class RealTimeDomain;
class TimeDomain;
class TaskQueueManagerDelegate;
+class TaskTimeTracker;
// The task queue manager provides N task queues and a selector interface for
// choosing which task queue to service next. Each task queue consists of two
@@ -82,6 +83,10 @@ class SCHEDULER_EXPORT TaskQueueManager
// tasks posted to the main loop. The batch size is 1 by default.
void SetWorkBatchSize(int work_batch_size);
+ void SetTaskTimeTracker(TaskTimeTracker* task_time_tracker) {
alex clarke (OOO till 29th) 2016/07/06 09:51:39 Please add a brief comment explaining what happens
tdresser 2016/07/06 13:25:34 Done.
+ task_time_tracker_ = task_time_tracker;
+ }
+
// These functions can only be called on the same thread that the task queue
// manager executes its tasks on.
void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer);
@@ -167,7 +172,8 @@ class SCHEDULER_EXPORT TaskQueueManager
// run and |should_trigger_wakeup|. Call with an empty |previous_task| if no
// task was just run.
void UpdateWorkQueues(bool should_trigger_wakeup,
- const internal::TaskQueueImpl::Task* previous_task);
+ const internal::TaskQueueImpl::Task* previous_task,
+ LazyNow lazy_now);
// Chooses the next work queue to service. Returns true if |out_queue|
// indicates the queue from which the next task should be run, false to
@@ -226,7 +232,7 @@ class SCHEDULER_EXPORT TaskQueueManager
bool task_was_run_on_quiescence_monitored_queue_;
- // To reduce locking overhead we track pending calls to DoWork seperatly for
+ // To reduce locking overhead we track pending calls to DoWork seperately for
Sami 2016/07/06 10:08:29 typo: separately :)
tdresser 2016/07/06 13:25:34 Done.
// the main thread and other threads.
std::set<base::TimeTicks> main_thread_pending_wakeups_;
@@ -239,6 +245,8 @@ class SCHEDULER_EXPORT TaskQueueManager
base::ObserverList<base::MessageLoop::TaskObserver> task_observers_;
+ TaskTimeTracker* task_time_tracker_; // NOT OWNED
+
const char* tracing_category_;
const char* disabled_by_default_tracing_category_;
const char* disabled_by_default_verbose_tracing_category_;

Powered by Google App Engine
This is Rietveld 408576698