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

Unified Diff: components/scheduler/base/task_time_tracker.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_time_tracker.h
diff --git a/components/scheduler/base/task_time_tracker.h b/components/scheduler/base/task_time_tracker.h
new file mode 100644
index 0000000000000000000000000000000000000000..f3a94cf92a9c24fc5eec4a3ce1579c84a0b34524
--- /dev/null
+++ b/components/scheduler/base/task_time_tracker.h
@@ -0,0 +1,42 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_SCHEDULER_BASE_TASK_TIME_TRACKER_H_
+#define CONTENT_RENDERER_SCHEDULER_BASE_TASK_TIME_TRACKER_H_
+
+#include <memory>
+#include <vector>
+
+#include "base/macros.h"
+#include "base/time/default_tick_clock.h"
+#include "base/time/time.h"
+#include "components/scheduler/base/queueing_time_estimator.h"
+#include "components/scheduler/scheduler_export.h"
+
+namespace scheduler {
+
+class SCHEDULER_EXPORT TaskTimeTracker {
Sami 2016/07/06 10:08:29 Is there a reason to keep TaskTimeTracker and Task
tdresser 2016/07/06 13:25:34 Done.
+ public:
+ class SCHEDULER_EXPORT Observer {
alex clarke (OOO till 29th) 2016/07/06 09:51:39 Nit: DISALLOW_COPY_AND_ASSIGN(Observer)
tdresser 2016/07/06 13:25:34 No longer needed.
+ public:
+ virtual void ReportTaskTime(base::TimeTicks start_time,
+ base::TimeTicks end_time) = 0;
+ virtual ~Observer() {}
+ };
+
+ TaskTimeTracker(Observer* observer);
alex clarke (OOO till 29th) 2016/07/06 09:51:39 nit: explicit
tdresser 2016/07/06 13:25:34 No longer needed.
+ ~TaskTimeTracker();
+
+ void ReportTaskTime(base::TimeTicks startTime, base::TimeTicks endTime);
+
+ private:
+ // Not owned.
+ Observer* observer_;
+
+ DISALLOW_COPY_AND_ASSIGN(TaskTimeTracker);
+};
+
+} // namespace scheduler
+
+#endif // CONTENT_RENDERER_SCHEDULER_BASE_TASK_TIME_TRACKER_H_

Powered by Google App Engine
This is Rietveld 408576698