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

Unified Diff: mojo/public/cpp/environment/tests/run_loop_async_wait_perftest.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/cpp/environment/tests/logging_unittest.cc ('k') | mojo/public/cpp/system/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/environment/tests/run_loop_async_wait_perftest.cc
diff --git a/mojo/public/cpp/environment/tests/run_loop_async_wait_perftest.cc b/mojo/public/cpp/environment/tests/run_loop_async_wait_perftest.cc
deleted file mode 100644
index f809a8e4ee24b5ebfcb490b065ed4dfa4840f1a2..0000000000000000000000000000000000000000
--- a/mojo/public/cpp/environment/tests/run_loop_async_wait_perftest.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file has perf tests for async waits using |mojo::RunLoop| (i.e., the
-// "standalone" |Environment|).
-
-#include <stdio.h>
-
-#include "gtest/gtest.h"
-#include "mojo/public/c/tests/environment/async_waiter_perftest_helpers.h"
-#include "mojo/public/cpp/environment/environment.h"
-#include "mojo/public/cpp/test_support/test_support.h"
-#include "mojo/public/cpp/utility/run_loop.h"
-
-namespace mojo {
-namespace {
-
-constexpr MojoTimeTicks kPerftestTimeMicroseconds = 3 * 1000000;
-
-TEST(RunLoopAsyncWaitPerftest, SingleThreaded) {
- for (uint32_t num_handles = 1u; num_handles <= 10000u; num_handles *= 10u) {
- RunLoop run_loop;
-
- MojoTimeTicks start_time = 0;
- MojoTimeTicks end_time = 0;
- uint64_t raw_result = test::DoAsyncWaiterPerfTest(
- Environment::GetDefaultAsyncWaiter(), num_handles,
- [&start_time, &end_time]() {
- RunLoop::current()->PostDelayedTask(
- []() { RunLoop::current()->Quit(); }, kPerftestTimeMicroseconds);
- start_time = MojoGetTimeTicksNow();
- RunLoop::current()->Run();
- end_time = MojoGetTimeTicksNow();
- });
-
- double result = static_cast<double>(raw_result) /
- (static_cast<double>(end_time - start_time) / 1000000.0);
- char sub_test_name[100] = {};
- sprintf(sub_test_name, "%u", static_cast<unsigned>(num_handles));
- test::LogPerfResult("RunLoopAsyncWaitPerftest.SingleThreaded",
- sub_test_name, result, "callbacks/second");
- }
-}
-
-} // namespace
-} // namespace mojo
« no previous file with comments | « mojo/public/cpp/environment/tests/logging_unittest.cc ('k') | mojo/public/cpp/system/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698