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

Side by Side Diff: components/scheduler/renderer/task_cost_estimator.cc

Issue 1898233002: Report expected task queueing time via UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Super rough alternative approach. Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/scheduler/renderer/task_cost_estimator.h" 5 #include "components/scheduler/renderer/task_cost_estimator.h"
6 6
7 #include "base/time/default_tick_clock.h" 7 #include "base/time/default_tick_clock.h"
8 8
9 namespace scheduler { 9 namespace scheduler {
10 10
(...skipping 19 matching lines...) Expand all
30 rolling_time_delta_history_.InsertSample(duration); 30 rolling_time_delta_history_.InsertSample(duration);
31 } 31 }
32 } 32 }
33 33
34 base::TimeDelta TaskCostEstimator::expected_task_duration() const { 34 base::TimeDelta TaskCostEstimator::expected_task_duration() const {
35 return rolling_time_delta_history_.Percentile(estimation_percentile_); 35 return rolling_time_delta_history_.Percentile(estimation_percentile_);
36 } 36 }
37 37
38 void TaskCostEstimator::Clear() { 38 void TaskCostEstimator::Clear() {
39 rolling_time_delta_history_.Clear(); 39 rolling_time_delta_history_.Clear();
40 expected_task_duration_ = base::TimeDelta();
41 } 40 }
42 41
43 } // namespace scheduler 42 } // namespace scheduler
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698