Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "components/scheduler/renderer/task_time_reporter.h" | |
| 6 | |
| 7 #include "base/metrics/histogram_macros.h" | |
| 8 | |
| 9 namespace scheduler { | |
| 10 namespace { | |
| 11 const int kSampleInterval = 100; | |
| 12 } | |
| 13 | |
| 14 TaskTimeReporter::TaskTimeReporter() : sample_count_(0) {} | |
| 15 | |
| 16 TaskTimeReporter::~TaskTimeReporter() {} | |
| 17 | |
| 18 void TaskTimeReporter::ReportTaskTime(base::TimeDelta duration) { | |
| 19 ++sample_count_; | |
| 20 if (sample_count_ == kSampleInterval) { | |
|
Sami
2016/07/28 11:20:26
+brianderson@, didn't we figure out that reducing
tdresser
2016/07/28 12:15:50
Yeah, sounds like that's the case.
majidvp
2016/07/28 13:30:11
The other reason that we considered down-sampling
| |
| 21 UMA_HISTOGRAM_CUSTOM_COUNTS("RendererScheduler.TaskTime", | |
| 22 duration.InMicroseconds(), 1, 1000000, 100); | |
|
Ilya Sherman
2016/07/28 00:31:30
Do you really need 100 buckets, or would 50 suffic
Ilya Sherman
2016/07/28 00:38:20
(Expanding this comment, now that I've read throug
tdresser
2016/07/28 12:15:50
Nope, you're right, in terms of memory used, downs
Ilya Sherman
2016/07/28 17:47:41
Let's be really concrete here. With 50 buckets, y
| |
| 23 sample_count_ = 0; | |
| 24 } | |
| 25 } | |
| 26 } | |
| OLD | NEW |