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

Unified Diff: ipc/mojo/ipc_mojo_perftest.cc

Issue 1350023003: Add a Mojo EDK for Chrome that uses one OS pipe per message pipe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more cleanup Created 5 years, 3 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
Index: ipc/mojo/ipc_mojo_perftest.cc
diff --git a/ipc/mojo/ipc_mojo_perftest.cc b/ipc/mojo/ipc_mojo_perftest.cc
index e3b91fd1ae45084dd08906c4208ebbd4f9d85981..1c84f2cc9192b27eeb2dbd742453f499256e439f 100644
--- a/ipc/mojo/ipc_mojo_perftest.cc
+++ b/ipc/mojo/ipc_mojo_perftest.cc
@@ -6,17 +6,17 @@
#include "base/run_loop.h"
#include "ipc/ipc_perftest_support.h"
#include "ipc/mojo/ipc_channel_mojo.h"
-#include "third_party/mojo/src/mojo/edk/embedder/test_embedder.h"
+#include "third_party/mojo/src/mojo/edk/embedder/platform_channel_pair.h"
+#include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
namespace {
// This is needed because we rely on //base/test:test_support_perf and
// it provides main() which doesn't have Mojo initialization. We need
-// some way to call InitWithSimplePlatformSupport() only once before
-// using Mojo.
+// some way to call Init() only once before using Mojo.
struct MojoInitialier {
MojoInitialier() {
- mojo::embedder::test::InitWithSimplePlatformSupport();
+ mojo::embedder::Init();
}
};
@@ -65,6 +65,20 @@ TEST_F(MojoChannelPerfTest, ChannelProxyPingPong) {
run_loop.RunUntilIdle();
}
+// Test to see how many channels we can create.
+TEST_F(MojoChannelPerfTest, DISABLED_MaxChannelCount) {
+#if defined(OS_POSIX)
+ LOG(INFO) << "base::GetMaxFds " << base::GetMaxFds();
+ base::SetFdLimit(20000);
+#endif
+
+ std::vector<mojo::embedder::PlatformChannelPair*> channels;
+ for (size_t i = 0; i < 10000; ++i) {
+ LOG(INFO) << "channels size: " << channels.size();
+ channels.push_back(new mojo::embedder::PlatformChannelPair());
+ }
+}
+
class MojoTestClient : public IPC::test::PingPongTestClient {
public:
typedef IPC::test::PingPongTestClient SuperType;

Powered by Google App Engine
This is Rietveld 408576698