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

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

Issue 2184023002: Report the duration of sampled tasks with histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Directly call from renderer_scheduler_impl.cc Created 4 years, 4 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
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/renderer_scheduler_impl.h" 5 #include "components/scheduler/renderer/renderer_scheduler_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/stack_trace.h" 8 #include "base/debug/stack_trace.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 " and https://crbug.com/574343#c40 for more information."); 1387 " and https://crbug.com/574343#c40 for more information.");
1388 } 1388 }
1389 } 1389 }
1390 1390
1391 void RendererSchedulerImpl::ReportTaskTime(base::TimeTicks start_time, 1391 void RendererSchedulerImpl::ReportTaskTime(base::TimeTicks start_time,
1392 base::TimeTicks end_time) { 1392 base::TimeTicks end_time) {
1393 MainThreadOnly().queueing_time_estimator.OnToplevelTaskCompleted(start_time, 1393 MainThreadOnly().queueing_time_estimator.OnToplevelTaskCompleted(start_time,
1394 end_time); 1394 end_time);
1395 MainThreadOnly().long_task_tracker.RecordLongTask( 1395 MainThreadOnly().long_task_tracker.RecordLongTask(
1396 start_time, end_time - start_time); 1396 start_time, end_time - start_time);
1397 UMA_HISTOGRAM_CUSTOM_COUNTS("RendererScheduler.TaskTime",
1398 (end_time - start_time).InMicroseconds(), 1,
1399 1000000, 50);
1397 } 1400 }
1398 1401
1399 LongTaskTracker::LongTaskTiming RendererSchedulerImpl::GetLongTaskTiming() { 1402 LongTaskTracker::LongTaskTiming RendererSchedulerImpl::GetLongTaskTiming() {
1400 return MainThreadOnly().long_task_tracker.GetLongTaskTiming(); 1403 return MainThreadOnly().long_task_tracker.GetLongTaskTiming();
1401 } 1404 }
1402 1405
1403 void RendererSchedulerImpl::OnQueueingTimeForWindowEstimated( 1406 void RendererSchedulerImpl::OnQueueingTimeForWindowEstimated(
1404 base::TimeDelta queueing_time) { 1407 base::TimeDelta queueing_time) {
1405 UMA_HISTOGRAM_TIMES("RendererScheduler.ExpectedTaskQueueingDuration", 1408 UMA_HISTOGRAM_TIMES("RendererScheduler.ExpectedTaskQueueingDuration",
1406 queueing_time); 1409 queueing_time);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1443 return "idle"; 1446 return "idle";
1444 case v8::PERFORMANCE_LOAD: 1447 case v8::PERFORMANCE_LOAD:
1445 return "load"; 1448 return "load";
1446 default: 1449 default:
1447 NOTREACHED(); 1450 NOTREACHED();
1448 return nullptr; 1451 return nullptr;
1449 } 1452 }
1450 } 1453 }
1451 1454
1452 } // namespace scheduler 1455 } // namespace scheduler
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698