OLD | NEW |
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 #include "mojo/public/cpp/test_support/test_utils.h" | 5 #include "mojo/public/cpp/test_support/test_utils.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 #include <stdint.h> |
| 9 |
7 #include "mojo/public/cpp/system/core.h" | 10 #include "mojo/public/cpp/system/core.h" |
8 #include "mojo/public/cpp/test_support/test_support.h" | 11 #include "mojo/public/cpp/test_support/test_support.h" |
9 | 12 |
10 namespace mojo { | 13 namespace mojo { |
11 namespace test { | 14 namespace test { |
12 | 15 |
13 bool WriteTextMessage(const MessagePipeHandle& handle, | 16 bool WriteTextMessage(const MessagePipeHandle& handle, |
14 const std::string& text) { | 17 const std::string& text) { |
15 MojoResult rv = WriteMessageRaw(handle, | 18 MojoResult rv = WriteMessageRaw(handle, |
16 text.data(), | 19 text.data(), |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 end_time = GetTimeTicksNow(); | 91 end_time = GetTimeTicksNow(); |
89 } while (end_time - start_time < kPerftestTimeMicroseconds); | 92 } while (end_time - start_time < kPerftestTimeMicroseconds); |
90 | 93 |
91 MojoTestSupportLogPerfResult(test_name, sub_test_name, | 94 MojoTestSupportLogPerfResult(test_name, sub_test_name, |
92 1000000.0 * iterations / (end_time - start_time), | 95 1000000.0 * iterations / (end_time - start_time), |
93 "iterations/second"); | 96 "iterations/second"); |
94 } | 97 } |
95 | 98 |
96 } // namespace test | 99 } // namespace test |
97 } // namespace mojo | 100 } // namespace mojo |
OLD | NEW |