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

Unified Diff: ipc/ipc_perftests.cc

Issue 196343019: IPC: Make ipc_perftests run on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ipc/ipc_multiprocess_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_perftests.cc
diff --git a/ipc/ipc_perftests.cc b/ipc/ipc_perftests.cc
index e7eeab9d8ea455e19785b4afd87496c04c3c83b2..d0d7e0d511ade8915840b1a64409dd31e7fd04a4 100644
--- a/ipc/ipc_perftests.cc
+++ b/ipc/ipc_perftests.cc
@@ -230,12 +230,13 @@ TEST_F(IPCChannelPerfTest, Performance) {
ASSERT_TRUE(ConnectChannel());
ASSERT_TRUE(StartClient());
- const size_t kMsgSizeBase = 12;
- const int kMsgSizeMaxExp = 5;
- int msg_count = 100000;
- size_t msg_size = kMsgSizeBase;
- for (int i = 1; i <= kMsgSizeMaxExp; i++) {
- listener.SetTestParams(msg_count, msg_size);
+ // Test several sizes. We use 12^N for message size, and limit the message
+ // count to keep the test duration reasonable.
+ const size_t kMsgSize[5] = {12, 144, 1728, 20736, 248832};
+ const size_t kMessageCount[5] = {50000, 50000, 50000, 12000, 1000};
+
+ for (size_t i = 0; i < 5; i++) {
+ listener.SetTestParams(kMessageCount[i], kMsgSize[i]);
// This initial message will kick-start the ping-pong of messages.
IPC::Message* message =
@@ -247,8 +248,6 @@ TEST_F(IPCChannelPerfTest, Performance) {
// Run message loop.
base::MessageLoop::current()->Run();
-
- msg_size *= kMsgSizeBase;
}
// Send quit message.
« no previous file with comments | « ipc/ipc_multiprocess_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698