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

Unified Diff: components/scheduler/renderer/renderer_task_duration.h

Issue 2184023002: Report the duration of sampled tasks with histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/renderer/renderer_task_duration.h
diff --git a/components/scheduler/renderer/renderer_task_duration.h b/components/scheduler/renderer/renderer_task_duration.h
new file mode 100644
index 0000000000000000000000000000000000000000..0fae8700de35c236796eea917af18e6f431f0383
--- /dev/null
+++ b/components/scheduler/renderer/renderer_task_duration.h
@@ -0,0 +1,22 @@
+// 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 COMPONENTS_SCHEDULER_RENDERER_RENDERER_TASK_DURATION_H_
+#define COMPONENTS_SCHEDULER_RENDERER_RENDERER_TASK_DURATION_H_
+
+#include "base/time/time.h"
+
+namespace scheduler {
+class RendererTaskDuration {
majidvp 2016/07/27 13:50:59 I think the convention is to have a blank line bef
majidvp 2016/07/27 13:50:59 I think a better name may be a TaskDurationReporte
sunyunjia 2016/07/27 17:28:42 Done.
sunyunjia 2016/07/27 17:28:42 Done.
+ public:
+ RendererTaskDuration();
+ ~RendererTaskDuration();
+ void ReportSampleDuration(base::TimeDelta duration);
+ static const int kSampleInterval = 100;
majidvp 2016/07/27 13:50:59 This constant does not need to be public. Please m
sunyunjia 2016/07/27 17:28:43 Done.
+ private:
+ int sample_count_;
+};
majidvp 2016/07/27 13:50:59 This class is not meant to be copies/moved so plea
sunyunjia 2016/07/27 17:28:42 Done.
+}
+
+#endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_TASK_DURATION_H_

Powered by Google App Engine
This is Rietveld 408576698