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

Unified Diff: components/scheduler/renderer/task_time_reporter.cc

Issue 2184023002: Report the duration of sampled tasks with histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove the sampling part. Change bin number to 50. 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 side-by-side diff with in-line comments
Download patch
Index: components/scheduler/renderer/task_time_reporter.cc
diff --git a/components/scheduler/renderer/task_time_reporter.cc b/components/scheduler/renderer/task_time_reporter.cc
new file mode 100644
index 0000000000000000000000000000000000000000..8f9207e14a20f1b8e395dc19e18a87b43e011b4e
--- /dev/null
+++ b/components/scheduler/renderer/task_time_reporter.cc
@@ -0,0 +1,18 @@
+// 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.
+
+#include "components/scheduler/renderer/task_time_reporter.h"
+
+#include "base/metrics/histogram_macros.h"
+
+namespace scheduler {
+TaskTimeReporter::TaskTimeReporter() {}
+
+TaskTimeReporter::~TaskTimeReporter() {}
+
+void TaskTimeReporter::ReportTaskTime(base::TimeDelta duration) {
+ UMA_HISTOGRAM_CUSTOM_COUNTS("RendererScheduler.TaskTime",
+ duration.InMicroseconds(), 1, 1000000, 50);
Ilya Sherman 2016/08/03 00:54:46 Optional nit: It seems rather heavy-weight to defi
Sami 2016/08/03 10:01:22 I agree -- could you move the macro to the call si
+}
+}
« no previous file with comments | « components/scheduler/renderer/task_time_reporter.h ('k') | components/scheduler/renderer/task_time_reporter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698