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

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

Issue 1783623005: Add mojo/c/system/{time.h,wait.h}. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 9 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 the C API. 5 // This tests the performance of the C API.
6 6
7 #include <assert.h> 7 #include <assert.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <stdio.h> 9 #include <stdio.h>
10 #include <time.h> 10 #include <time.h>
11 11
12 #include <functional> 12 #include <functional>
13 #include <thread> 13 #include <thread>
14 14
15 #include "mojo/public/c/system/functions.h"
16 #include "mojo/public/c/system/handle.h" 15 #include "mojo/public/c/system/handle.h"
17 #include "mojo/public/c/system/message_pipe.h" 16 #include "mojo/public/c/system/message_pipe.h"
18 #include "mojo/public/c/system/result.h" 17 #include "mojo/public/c/system/result.h"
19 #include "mojo/public/c/system/types.h" 18 #include "mojo/public/c/system/time.h"
19 #include "mojo/public/c/system/wait.h"
20 #include "mojo/public/cpp/system/macros.h" 20 #include "mojo/public/cpp/system/macros.h"
21 #include "mojo/public/cpp/test_support/test_support.h" 21 #include "mojo/public/cpp/test_support/test_support.h"
22 #include "testing/gtest/include/gtest/gtest.h" 22 #include "testing/gtest/include/gtest/gtest.h"
23 23
24 namespace { 24 namespace {
25 25
26 using PerfTestSingleIteration = std::function<void()>; 26 using PerfTestSingleIteration = std::function<void()>;
27 27
28 void IterateAndReportPerf(const char* test_name, 28 void IterateAndReportPerf(const char* test_name,
29 const char* sub_test_name, 29 const char* sub_test_name,
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 DoMessagePipeThreadedTest(1u, 1u, 10000u); 343 DoMessagePipeThreadedTest(1u, 1u, 10000u);
344 344
345 DoMessagePipeThreadedTest(3u, 3u, 10u); 345 DoMessagePipeThreadedTest(3u, 3u, 10u);
346 // 100 was done above. 346 // 100 was done above.
347 DoMessagePipeThreadedTest(3u, 3u, 1000u); 347 DoMessagePipeThreadedTest(3u, 3u, 1000u);
348 DoMessagePipeThreadedTest(3u, 3u, 10000u); 348 DoMessagePipeThreadedTest(3u, 3u, 10000u);
349 } 349 }
350 #endif // !defined(WIN32) 350 #endif // !defined(WIN32)
351 351
352 } // namespace 352 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698