Chromium Code Reviews| Index: components/scheduler/renderer/task_duration_reporter.h |
| diff --git a/components/scheduler/renderer/task_duration_reporter.h b/components/scheduler/renderer/task_duration_reporter.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a7eaab7057f9e5ac95bc1d4cd1bb6b10f04d68e0 |
| --- /dev/null |
| +++ b/components/scheduler/renderer/task_duration_reporter.h |
| @@ -0,0 +1,26 @@ |
| +// 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_TASK_DURATIN_REPORTER_H_ |
| +#define COMPONENTS_SCHEDULER_RENDERER_TASK_DURATIN_REPORTER_H_ |
| + |
| +#include "base/time/time.h" |
| + |
| +namespace scheduler { |
| + |
| +// Report the task duration in a histogram for every 100th task |
|
majidvp
2016/07/27 18:34:03
nit: comment should end with a period.
sunyunjia
2016/07/27 19:51:04
Done.
|
| +class TaskDurationReporter { |
| + public: |
| + TaskDurationReporter(); |
| + ~TaskDurationReporter(); |
| + void ReportSampleDuration(base::TimeDelta duration); |
|
tdresser
2016/07/27 18:04:25
Maybe ReportTaskDuration?
sunyunjia
2016/07/27 19:51:04
Done.
|
| + private: |
| + int sample_count_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(TaskDurationReporter); |
| +}; |
| + |
| +} |
| + |
| +#endif // COMPONENTS_SCHEDULER_RENDERER_TASK_DURATIN_REPORTER_H_ |