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

Side by Side Diff: ipc/ipc_perftest_support.cc

Issue 929433005: WIP: A couple of more ChannelMojo speedup ideas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build and test fix Created 5 years, 10 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
« no previous file with comments | « no previous file | ipc/mojo/async_handle_waiter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ipc/ipc_perftest_support.h" 5 #include "ipc/ipc_perftest_support.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 std::string payload_; 222 std::string payload_;
223 EventTimeTracker latency_tracker_; 223 EventTimeTracker latency_tracker_;
224 scoped_ptr<base::PerfTimeLogger> perf_logger_; 224 scoped_ptr<base::PerfTimeLogger> perf_logger_;
225 }; 225 };
226 226
227 std::vector<PingPongTestParams> 227 std::vector<PingPongTestParams>
228 IPCChannelPerfTestBase::GetDefaultTestParams() { 228 IPCChannelPerfTestBase::GetDefaultTestParams() {
229 // Test several sizes. We use 12^N for message size, and limit the message 229 // Test several sizes. We use 12^N for message size, and limit the message
230 // count to keep the test duration reasonable. 230 // count to keep the test duration reasonable.
231 std::vector<PingPongTestParams> list; 231 std::vector<PingPongTestParams> list;
232 #if 0
232 list.push_back(PingPongTestParams(12, 50000)); 233 list.push_back(PingPongTestParams(12, 50000));
233 list.push_back(PingPongTestParams(144, 50000)); 234 list.push_back(PingPongTestParams(144, 50000));
234 list.push_back(PingPongTestParams(1728, 50000)); 235 list.push_back(PingPongTestParams(1728, 50000));
235 list.push_back(PingPongTestParams(20736, 12000)); 236 list.push_back(PingPongTestParams(20736, 12000));
236 list.push_back(PingPongTestParams(248832, 1000)); 237 list.push_back(PingPongTestParams(248832, 1000));
238 #else
239 // list.push_back(PingPongTestParams(12, 1000000));
240 list.push_back(PingPongTestParams(12, 1000000));
241 #endif
237 return list; 242 return list;
238 } 243 }
239 244
240 void IPCChannelPerfTestBase::RunTestChannelPingPong( 245 void IPCChannelPerfTestBase::RunTestChannelPingPong(
241 const std::vector<PingPongTestParams>& params) { 246 const std::vector<PingPongTestParams>& params) {
242 Init("PerformanceClient"); 247 Init("PerformanceClient");
243 248
244 // Set up IPC channel and start client. 249 // Set up IPC channel and start client.
245 PerformanceChannelListener listener("Channel"); 250 PerformanceChannelListener listener("Channel");
246 CreateChannel(&listener); 251 CreateChannel(&listener);
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 auto set_result = SetThreadAffinityMask(GetCurrentThread(), old_affinity_); 377 auto set_result = SetThreadAffinityMask(GetCurrentThread(), old_affinity_);
373 DCHECK_NE(0u, set_result); 378 DCHECK_NE(0u, set_result);
374 #elif defined(OS_LINUX) 379 #elif defined(OS_LINUX)
375 auto set_result = sched_setaffinity(0, sizeof(old_cpuset_), &old_cpuset_); 380 auto set_result = sched_setaffinity(0, sizeof(old_cpuset_), &old_cpuset_);
376 DCHECK_EQ(0, set_result); 381 DCHECK_EQ(0, set_result);
377 #endif 382 #endif
378 } 383 }
379 384
380 } // namespace test 385 } // namespace test
381 } // namespace IPC 386 } // namespace IPC
OLDNEW
« no previous file with comments | « no previous file | ipc/mojo/async_handle_waiter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698