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

Side by Side Diff: ipc/ipc_perftest_support.h

Issue 536213002: Add ipc_mojo_perftests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed garbage Created 6 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 unified diff | Download patch
« no previous file with comments | « ipc/ipc_channel_factory.h ('k') | ipc/ipc_perftest_support.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2014 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 IPC_IPC_PERFTEST_SUPPORT_H_
6 #define IPC_IPC_PERFTEST_SUPPORT_H_
7
8 #include <vector>
9
10 #include "ipc/ipc_test_base.h"
11
12 namespace IPC {
13 namespace test {
14
15 class ChannelReflectorListener;
16
17 class PingPongTestParams {
18 public:
19 PingPongTestParams(size_t size, int count)
20 : message_size_(size), message_count_(count) {
21 }
22
23 size_t message_size() const { return message_size_; }
24 int message_count() const { return message_count_; }
25
26 private:
27 size_t message_size_;
28 int message_count_;
29 };
30
31 class IPCChannelPerfTestBase : public IPCTestBase {
32 public:
33 static std::vector<PingPongTestParams> GetDefaultTestParams();
34
35 void RunTestChannelPingPong(
36 const std::vector<PingPongTestParams>& params_list);
37 void RunTestChannelProxyPingPong(
38 const std::vector<PingPongTestParams>& params_list);
39 };
40
41 class PingPongTestClient {
42 public:
43 PingPongTestClient();
44 virtual ~PingPongTestClient();
45
46 virtual scoped_ptr<Channel> CreateChannel(Listener* listener);
47 int RunMain();
48 scoped_refptr<base::TaskRunner> task_runner();
49
50 private:
51 base::MessageLoopForIO main_message_loop_;
52 scoped_ptr<ChannelReflectorListener> listener_;
53 scoped_ptr<Channel> channel_;
54 };
55
56 }
57 }
58
59 #endif // IPC_IPC_PERFTEST_SUPPORT_H_
OLDNEW
« no previous file with comments | « ipc/ipc_channel_factory.h ('k') | ipc/ipc_perftest_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698