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

Side by Side Diff: mojo/public/c/system/tests/wait_set_perftest.cc

Issue 2229573002: Change the canonical way to include the C macros.h to <mojo/macros.h>. (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 tests the performance of wait sets via the C API. 5 // This tests the performance of wait sets via the C API.
6 6
7 #include "mojo/public/c/system/wait_set.h" 7 #include "mojo/public/c/system/wait_set.h"
8 8
9 #include <assert.h> 9 #include <assert.h>
10 #include <mojo/macros.h>
10 #include <stdint.h> 11 #include <stdint.h>
11 #include <stdio.h> 12 #include <stdio.h>
12 13
13 #include <atomic> 14 #include <atomic>
14 #include <thread> 15 #include <thread>
15 #include <vector> 16 #include <vector>
16 17
17 #include "mojo/public/c/system/handle.h" 18 #include "mojo/public/c/system/handle.h"
18 #include "mojo/public/c/system/macros.h"
19 #include "mojo/public/c/system/message_pipe.h" 19 #include "mojo/public/c/system/message_pipe.h"
20 #include "mojo/public/c/system/result.h" 20 #include "mojo/public/c/system/result.h"
21 #include "mojo/public/c/system/tests/perftest_utils.h" 21 #include "mojo/public/c/system/tests/perftest_utils.h"
22 #include "mojo/public/cpp/test_support/test_support.h" 22 #include "mojo/public/cpp/test_support/test_support.h"
23 #include "testing/gtest/include/gtest/gtest.h" 23 #include "testing/gtest/include/gtest/gtest.h"
24 24
25 namespace { 25 namespace {
26 26
27 // Creates a wait set, creates a bunch of message pipes, and populates the wait 27 // Creates a wait set, creates a bunch of message pipes, and populates the wait
28 // set with entries. There will be |num_entries| entries; the |i|-th entry will 28 // set with entries. There will be |num_entries| entries; the |i|-th entry will
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 170 }
171 171
172 TEST(WaitSetPerftest, ThreadedWait) { 172 TEST(WaitSetPerftest, ThreadedWait) {
173 DoWaitSetThreadedWaitTest(10u); 173 DoWaitSetThreadedWaitTest(10u);
174 DoWaitSetThreadedWaitTest(100u); 174 DoWaitSetThreadedWaitTest(100u);
175 DoWaitSetThreadedWaitTest(1000u); 175 DoWaitSetThreadedWaitTest(1000u);
176 DoWaitSetThreadedWaitTest(10000u); 176 DoWaitSetThreadedWaitTest(10000u);
177 } 177 }
178 178
179 } // namespace 179 } // namespace
OLDNEW
« no previous file with comments | « mojo/public/c/system/tests/perftest_utils.cc ('k') | mojo/public/cpp/bindings/lib/array_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698