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

Side by Side Diff: mojo/public/c/tests/system/message_pipe_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 2013 The Chromium Authors. All rights reserved. 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 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 tests the performance of message pipes via the C API. 5 // This tests the performance of message pipes via the C API.
6 6
7 #include <mojo/system/message_pipe.h> 7 #include <mojo/system/message_pipe.h>
8 8
9 #include <assert.h> 9 #include <assert.h>
10 #include <mojo/macros.h> 10 #include <mojo/macros.h>
11 #include <mojo/result.h> 11 #include <mojo/result.h>
12 #include <mojo/system/handle.h> 12 #include <mojo/system/handle.h>
13 #include <mojo/system/time.h> 13 #include <mojo/system/time.h>
14 #include <mojo/system/wait.h> 14 #include <mojo/system/wait.h>
15 #include <stdint.h> 15 #include <stdint.h>
16 #include <stdio.h> 16 #include <stdio.h>
17 17
18 #include <thread> 18 #include <thread>
19 19
20 #include "gtest/gtest.h"
20 #include "mojo/public/c/tests/system/perftest_utils.h" 21 #include "mojo/public/c/tests/system/perftest_utils.h"
21 #include "mojo/public/cpp/test_support/test_support.h" 22 #include "mojo/public/cpp/test_support/test_support.h"
22 #include "testing/gtest/include/gtest/gtest.h"
23 23
24 namespace { 24 namespace {
25 25
26 TEST(MessagePipePerftest, CreateAndClose) { 26 TEST(MessagePipePerftest, CreateAndClose) {
27 mojo::test::IterateAndReportPerf("MessagePipe_CreateAndClose", nullptr, []() { 27 mojo::test::IterateAndReportPerf("MessagePipe_CreateAndClose", nullptr, []() {
28 MojoHandle h0; 28 MojoHandle h0;
29 MojoHandle h1; 29 MojoHandle h1;
30 MojoResult result = MojoCreateMessagePipe(nullptr, &h0, &h1); 30 MojoResult result = MojoCreateMessagePipe(nullptr, &h0, &h1);
31 MOJO_ALLOW_UNUSED_LOCAL(result); 31 MOJO_ALLOW_UNUSED_LOCAL(result);
32 assert(result == MOJO_RESULT_OK); 32 assert(result == MOJO_RESULT_OK);
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 DoMessagePipeThreadedTest(1u, 1u, 1000u); 229 DoMessagePipeThreadedTest(1u, 1u, 1000u);
230 DoMessagePipeThreadedTest(1u, 1u, 10000u); 230 DoMessagePipeThreadedTest(1u, 1u, 10000u);
231 231
232 DoMessagePipeThreadedTest(3u, 3u, 10u); 232 DoMessagePipeThreadedTest(3u, 3u, 10u);
233 // 100 was done above. 233 // 100 was done above.
234 DoMessagePipeThreadedTest(3u, 3u, 1000u); 234 DoMessagePipeThreadedTest(3u, 3u, 1000u);
235 DoMessagePipeThreadedTest(3u, 3u, 10000u); 235 DoMessagePipeThreadedTest(3u, 3u, 10000u);
236 } 236 }
237 237
238 } // namespace 238 } // namespace
OLDNEW
« no previous file with comments | « mojo/public/c/tests/system/handle_unittest.cc ('k') | mojo/public/c/tests/system/message_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698