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

Side by Side Diff: mojo/public/cpp/environment/tests/run_loop_async_wait_perftest.cc

Issue 2244503002: mojo/public: Include gtest.h as "gtest/gtest.h", instead of via "absolute" path. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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
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 |mojo::RunLoop| (i.e., the 5 // This file has perf tests for async waits using |mojo::RunLoop| (i.e., the
6 // "standalone" |Environment|). 6 // "standalone" |Environment|).
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 9
10 #include "gtest/gtest.h"
10 #include "mojo/public/c/tests/environment/async_waiter_perftest_helpers.h" 11 #include "mojo/public/c/tests/environment/async_waiter_perftest_helpers.h"
11 #include "mojo/public/cpp/environment/environment.h" 12 #include "mojo/public/cpp/environment/environment.h"
12 #include "mojo/public/cpp/test_support/test_support.h" 13 #include "mojo/public/cpp/test_support/test_support.h"
13 #include "mojo/public/cpp/utility/run_loop.h" 14 #include "mojo/public/cpp/utility/run_loop.h"
14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 namespace mojo { 16 namespace mojo {
17 namespace { 17 namespace {
18 18
19 constexpr MojoTimeTicks kPerftestTimeMicroseconds = 3 * 1000000; 19 constexpr MojoTimeTicks kPerftestTimeMicroseconds = 3 * 1000000;
20 20
21 TEST(RunLoopAsyncWaitPerftest, SingleThreaded) { 21 TEST(RunLoopAsyncWaitPerftest, SingleThreaded) {
22 for (uint32_t num_handles = 1u; num_handles <= 10000u; num_handles *= 10u) { 22 for (uint32_t num_handles = 1u; num_handles <= 10000u; num_handles *= 10u) {
23 RunLoop run_loop; 23 RunLoop run_loop;
24 24
(...skipping 13 matching lines...) Expand all
38 (static_cast<double>(end_time - start_time) / 1000000.0); 38 (static_cast<double>(end_time - start_time) / 1000000.0);
39 char sub_test_name[100] = {}; 39 char sub_test_name[100] = {};
40 sprintf(sub_test_name, "%u", static_cast<unsigned>(num_handles)); 40 sprintf(sub_test_name, "%u", static_cast<unsigned>(num_handles));
41 test::LogPerfResult("RunLoopAsyncWaitPerftest.SingleThreaded", 41 test::LogPerfResult("RunLoopAsyncWaitPerftest.SingleThreaded",
42 sub_test_name, result, "callbacks/second"); 42 sub_test_name, result, "callbacks/second");
43 } 43 }
44 } 44 }
45 45
46 } // namespace 46 } // namespace
47 } // namespace mojo 47 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/environment/tests/logging_unittest.cc ('k') | mojo/public/cpp/system/tests/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698