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

Unified Diff: components/tracing/test/trace_event_perftest.cc

Issue 2656303003: Test virtual interface [NOT FOR REVIEW] (Closed)
Patch Set: Created 3 years, 11 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/tracing/test/trace_event_perftest.cc
diff --git a/components/tracing/test/trace_event_perftest.cc b/components/tracing/test/trace_event_perftest.cc
index f893cce48b56ebc1addd79261e10a6e7ad141860..545f358faadcc022af615565c03b2e4b3c6c2ca7 100644
--- a/components/tracing/test/trace_event_perftest.cc
+++ b/components/tracing/test/trace_event_perftest.cc
@@ -11,6 +11,7 @@
#include "base/trace_event/trace_event_argument.h"
#include "perf_test_helpers.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "tracing_interface_simulator.h"
namespace tracing {
namespace {
@@ -165,5 +166,30 @@ TEST_F(TraceEventPerfTest, Submit_10000_TRACE_EVENT0_multithreaded) {
}
}
+TEST_F(TraceEventPerfTest, Submit_50000_TRACE_EVENT_TEST_via_virtual_calls) {
+ BeginTrace();
+ InitTracingInterface();
+ IterableStopwatch stopwatch("events");
+ for (int lap = 0; lap < kNumRuns; lap++) {
+ for (int i = 0; i < 50000; i++) {
+ TRACE_EVENT_VIRTUAL_TEST("test_category", "test call");
+ }
+ stopwatch.NextLap();
+ }
+ EndTraceAndFlush();
+}
+
+TEST_F(TraceEventPerfTest, Submit_50000_TRACE_EVENT_TEST_via_direct_calls) {
+ BeginTrace();
+ IterableStopwatch stopwatch("events");
+ for (int lap = 0; lap < kNumRuns; lap++) {
+ for (int i = 0; i < 50000; i++) {
+ TRACE_EVENT_DIRECT_TEST("test_category", "test call");
+ }
+ stopwatch.NextLap();
+ }
+ EndTraceAndFlush();
+}
+
} // namespace
} // namespace tracing

Powered by Google App Engine
This is Rietveld 408576698