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

Unified Diff: cc/debug/benchmark_instrumentation.cc

Issue 25353009: telemetry: Refactored rasterize_and_record measurement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made BenchmarkInstrumentation a class. Created 7 years, 2 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
« no previous file with comments | « cc/debug/benchmark_instrumentation.h ('k') | cc/debug/rendering_stats.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/benchmark_instrumentation.cc
diff --git a/cc/debug/benchmark_instrumentation.cc b/cc/debug/benchmark_instrumentation.cc
new file mode 100644
index 0000000000000000000000000000000000000000..bf2b02227201cd688be0371271a8aed77b6e4594
--- /dev/null
+++ b/cc/debug/benchmark_instrumentation.cc
@@ -0,0 +1,30 @@
+// Copyright 2013 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 "base/debug/trace_event.h"
+#include "cc/debug/benchmark_instrumentation.h"
+
+namespace cc {
+
+// Please do not change the trace events in this file without updating
+// tools/perf/measurements/rendering_stats.py accordingly.
+// The benchmarks search for events and their arguments by name.
+
+void BenchmarkInstrumentation::IssueMainThreadRenderingStatsEvent(
+ const MainThreadRenderingStats& stats) {
+ TRACE_EVENT_INSTANT1("benchmark",
+ "BenchmarkInstrumentation::MainThreadRenderingStats",
+ TRACE_EVENT_SCOPE_THREAD,
+ "data", stats.AsTraceableData());
+}
+
+void BenchmarkInstrumentation::IssueImplThreadRenderingStatsEvent(
+ const ImplThreadRenderingStats& stats) {
+ TRACE_EVENT_INSTANT1("benchmark",
+ "BenchmarkInstrumentation::ImplThreadRenderingStats",
+ TRACE_EVENT_SCOPE_THREAD,
+ "data", stats.AsTraceableData());
+}
+
+} // namespace cc
« no previous file with comments | « cc/debug/benchmark_instrumentation.h ('k') | cc/debug/rendering_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698