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

Side by Side Diff: mojo/environment/async_wait_perftest.cc

Issue 2235993002: Move mojo/public/c/environment/tests to mojo/public/c/tests/environment. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: oops 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 unified diff | Download patch
« no previous file with comments | « mojo/environment/BUILD.gn ('k') | mojo/public/c/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has perf tests for async waits using |base::MessageLoop| (i.e., the 5 // This file has perf tests for async waits using |base::MessageLoop| (i.e., the
6 // "Chromium" |Environment|). 6 // "Chromium" |Environment|).
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <functional> 10 #include <functional>
11 #include <memory> 11 #include <memory>
12 12
13 #include "base/bind.h" 13 #include "base/bind.h"
14 #include "base/location.h" 14 #include "base/location.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/message_loop/message_loop.h" 16 #include "base/message_loop/message_loop.h"
17 #include "base/strings/stringprintf.h" 17 #include "base/strings/stringprintf.h"
18 #include "base/test/perf_log.h" 18 #include "base/test/perf_log.h"
19 #include "base/time/time.h" 19 #include "base/time/time.h"
20 #include "mojo/message_pump/message_pump_mojo.h" 20 #include "mojo/message_pump/message_pump_mojo.h"
21 #include "mojo/public/c/environment/tests/async_waiter_perftest_helpers.h" 21 #include "mojo/public/c/tests/environment/async_waiter_perftest_helpers.h"
22 #include "mojo/public/cpp/environment/environment.h" 22 #include "mojo/public/cpp/environment/environment.h"
23 #include "testing/gtest/include/gtest/gtest.h" 23 #include "testing/gtest/include/gtest/gtest.h"
24 24
25 namespace mojo { 25 namespace mojo {
26 namespace { 26 namespace {
27 27
28 constexpr int64_t kPerftestTimeMicroseconds = 3 * 1000000; 28 constexpr int64_t kPerftestTimeMicroseconds = 3 * 1000000;
29 29
30 void QuitMessageLoopNow() { 30 void QuitMessageLoopNow() {
31 base::MessageLoop::current()->QuitNow(); 31 base::MessageLoop::current()->QuitNow();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 TEST(AsyncWaitPerfTest, SingleThreaded_MessagePumpMojo) { 69 TEST(AsyncWaitPerfTest, SingleThreaded_MessagePumpMojo) {
70 SingleThreadedTestHelper( 70 SingleThreadedTestHelper(
71 "AsyncWaitPerfTest.SingleThreaded_MessagePumpMojo", []() { 71 "AsyncWaitPerfTest.SingleThreaded_MessagePumpMojo", []() {
72 return std::unique_ptr<base::MessageLoop>(new base::MessageLoop( 72 return std::unique_ptr<base::MessageLoop>(new base::MessageLoop(
73 make_scoped_ptr(new common::MessagePumpMojo()))); 73 make_scoped_ptr(new common::MessagePumpMojo())));
74 }); 74 });
75 } 75 }
76 76
77 } // namespace 77 } // namespace
78 } // namespace mojo 78 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/environment/BUILD.gn ('k') | mojo/public/c/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698