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

Side by Side Diff: mojo/public/c/tests/system/perftest_utils.h

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MOJO_PUBLIC_C_TESTS_SYSTEM_PERFTEST_UTILS_H_
6 #define MOJO_PUBLIC_C_TESTS_SYSTEM_PERFTEST_UTILS_H_
7
8 #include <mojo/system/time.h>
9
10 #include <functional>
11
12 namespace mojo {
13 namespace test {
14
15 // How long to run each perf test for (in microseconds).
16 constexpr MojoTimeTicks kPerftestTimeMicroseconds = 3 * 1000000;
17
18 // Iterates the given function for |kPerftestTimeMicroseconds| and reports the
19 // number of iterations executed per second.
20 void IterateAndReportPerf(const char* test_name,
21 const char* sub_test_name,
22 std::function<void()> single_iteration);
23
24 // Sleeps for the given amount of time (in microseconds).
25 void Sleep(MojoTimeTicks microseconds);
26
27 } // namespace test
28 } // namespace mojo
29
30 #endif // MOJO_PUBLIC_C_TESTS_SYSTEM_PERFTEST_UTILS_H_
OLDNEW
« no previous file with comments | « mojo/public/c/tests/system/message_pipe_unittest.cc ('k') | mojo/public/c/tests/system/perftest_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698