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

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

Issue 2656303003: Test virtual interface [NOT FOR REVIEW] (Closed)
Patch Set: results 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
« no previous file with comments | « components/tracing/test/results_nexus5.txt ('k') | components/tracing/test/tracing_interface_simulator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 721c3aa43f9e781debcd923c4619fc3bf6609913..64ab973ea297e180c366f9f4690c6665ade6e0db 100644
--- a/components/tracing/test/trace_event_perftest.cc
+++ b/components/tracing/test/trace_event_perftest.cc
@@ -12,6 +12,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 {
@@ -187,5 +188,30 @@ TEST_F(TraceEventPerfTest, Submit_10000_TRACE_EVENT0_with_tracing_disabled) {
SubmitTraceEvents(10000);
}
+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
« no previous file with comments | « components/tracing/test/results_nexus5.txt ('k') | components/tracing/test/tracing_interface_simulator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698