Added assert() and assertInstanceof() declaration, added handling of assert() and...
[chromium-blink-merge.git] / cc / debug / benchmark_instrumentation.cc
blobadc969bef21daf0259ecc6a314ecc8c1e13702f7
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/debug/trace_event.h"
6 #include "cc/debug/benchmark_instrumentation.h"
8 namespace cc {
9 namespace benchmark_instrumentation {
11 // Please do not change the trace events in this file without updating
12 // tools/perf/measurements/rendering_stats.py accordingly.
13 // The benchmarks search for events and their arguments by name.
15 void IssueMainThreadRenderingStatsEvent(
16 const RenderingStats::MainThreadRenderingStats& stats) {
17 TRACE_EVENT_INSTANT1("benchmark",
18 "BenchmarkInstrumentation::MainThreadRenderingStats",
19 TRACE_EVENT_SCOPE_THREAD,
20 "data", stats.AsTraceableData());
23 void IssueImplThreadRenderingStatsEvent(
24 const RenderingStats::ImplThreadRenderingStats& stats) {
25 TRACE_EVENT_INSTANT1("benchmark",
26 "BenchmarkInstrumentation::ImplThreadRenderingStats",
27 TRACE_EVENT_SCOPE_THREAD,
28 "data", stats.AsTraceableData());
31 } // namespace benchmark_instrumentation
32 } // namespace cc