Chromium Code Reviews| Index: base/task_scheduler/task_tracker.cc |
| diff --git a/base/task_scheduler/task_tracker.cc b/base/task_scheduler/task_tracker.cc |
| index da21d5ea8ef510c33636cc993b34e3501aa09101..5dad684e1805e96c06e47de8a01cbdff09342552 100644 |
| --- a/base/task_scheduler/task_tracker.cc |
| +++ b/base/task_scheduler/task_tracker.cc |
| @@ -74,11 +74,11 @@ const char kQueueFunctionName[] = "base::PostTask"; |
| const char kRunFunctionName[] = "TaskSchedulerRunTask"; |
| HistogramBase* GetTaskLatencyHistogram(const char* suffix) { |
| - // Mimics the UMA_HISTOGRAM_TIMES macro. |
| - return Histogram::FactoryTimeGet( |
| - std::string("TaskScheduler.TaskLatency.") + suffix, |
| - TimeDelta::FromMilliseconds(1), TimeDelta::FromSeconds(10), 50, |
| - HistogramBase::kUmaTargetedHistogramFlag); |
| + // Mimics the UMA_HISTOGRAM_TIMES macro except we don't specify bounds with |
| + // TimeDeltas as FactoryTimeGet assumes millisecond granularity. |
| + return Histogram::FactoryGet( |
| + std::string("TaskScheduler.TaskLatencyMicroseconds.") + suffix, 1, 2000, |
|
gab
2017/04/28 01:49:29
2000 max is merely 2ms, I think we want something
robliao
2017/04/28 17:07:53
2ms covers 89-99% of the 7 day aggregation on Wind
robliao
2017/04/28 17:18:47
Inlining gab@'s reply to the thread:
Is that true
robliao
2017/04/28 17:23:41
So for background blocking the data is approximate
robliao
2017/04/28 17:57:38
Inlining gab@'s reply to this thread:
But so long
robliao
2017/04/28 18:17:59
Longer term, I would expect these values to go dow
|
| + 50, HistogramBase::kUmaTargetedHistogramFlag); |
| } |
| // Upper bound for the |
| @@ -495,7 +495,7 @@ void TaskTracker::RecordTaskLatencyHistogram(Task* task) { |
| task->traits.with_base_sync_primitives() |
| ? 1 |
| : 0] |
| - ->AddTime(task_latency); |
| + ->Add(task_latency.InMicroseconds()); |
| } |
| } // namespace internal |