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

Side by Side Diff: third_party/grpc/test/cpp/qps/qps-sweep.sh

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
(Empty)
1 #!/bin/sh
2
3 # Copyright 2015-2016, Google Inc.
4 # All rights reserved.
5 #
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are
8 # met:
9 #
10 # * Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer.
12 # * Redistributions in binary form must reproduce the above
13 # copyright notice, this list of conditions and the following disclaimer
14 # in the documentation and/or other materials provided with the
15 # distribution.
16 # * Neither the name of Google Inc. nor the names of its
17 # contributors may be used to endorse or promote products derived from
18 # this software without specific prior written permission.
19 #
20 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
32 if [ x"$QPS_WORKERS" == x ]; then
33 echo Error: Must set QPS_WORKERS variable in form \
34 "host:port,host:port,..." 1>&2
35 exit 1
36 fi
37
38 bins=`find . .. ../.. ../../.. -name bins | head -1`
39
40 # Print out each command that gets executed
41 set -x
42
43 #
44 # Specify parameters used in some of the tests
45 #
46
47 # big is the size in bytes of large messages (0 is the size otherwise)
48 big=65536
49
50 # wide is the number of client channels in multi-channel tests (1 otherwise)
51 wide=64
52
53 # deep is the number of RPCs outstanding on a channel in non-ping-pong tests
54 # (the value used is 1 otherwise)
55 deep=100
56
57 # half is half the count of worker processes, used in the crossbar scenario
58 # that uses equal clients and servers. The other scenarios use only 1 server
59 # and either 1 client or N-1 clients as appropriate
60 half=`echo $QPS_WORKERS | awk -F, '{print int(NF/2)}'`
61
62 for secure in true false; do
63 # Scenario 1: generic async streaming ping-pong (contentionless latency)
64 "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \
65 --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=1 \
66 --client_channels=1 --bbuf_req_size=0 --bbuf_resp_size=0 \
67 --async_client_threads=1 --async_server_threads=1 --secure_test=$secure \
68 --num_servers=1 --num_clients=1
69
70 # Scenario 2: generic async streaming "unconstrained" (QPS)
71 "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \
72 --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=$deep \
73 --client_channels=$wide --bbuf_req_size=0 --bbuf_resp_size=0 \
74 --async_client_threads=0 --async_server_threads=0 --secure_test=$secure \
75 --num_servers=1 --num_clients=0 2>&1 | tee /tmp/qps-test.$$
76
77 # Scenario 2b: QPS with a single server core
78 "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \
79 --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=$deep \
80 --client_channels=$wide --bbuf_req_size=0 --bbuf_resp_size=0 \
81 --async_client_threads=0 --async_server_threads=0 --secure_test=$secure \
82 --num_servers=1 --num_clients=0 --server_core_limit=1
83
84 # Scenario 2c: protobuf-based QPS
85 "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \
86 --server_type=ASYNC_SERVER --outstanding_rpcs_per_channel=$deep \
87 --client_channels=$wide --simple_req_size=0 --simple_resp_size=0 \
88 --async_client_threads=0 --async_server_threads=0 --secure_test=$secure \
89 --num_servers=1 --num_clients=0
90
91 # Scenario 3: Latency at sub-peak load (all clients equally loaded)
92 for loadfactor in 0.2 0.5 0.7; do
93 "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \
94 --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=$deep \
95 --client_channels=$wide --bbuf_req_size=0 --bbuf_resp_size=0 \
96 --async_client_threads=0 --async_server_threads=0 --secure_test=$secure \
97 --num_servers=1 --num_clients=0 --poisson_load=`awk -v lf=$loadfactor \
98 '$5 == "QPS:" {print int(lf * $6); exit}' /tmp/qps-test.$$`
99 done
100
101 rm /tmp/qps-test.$$
102
103 # Scenario 4: Single-channel bidirectional throughput test (like TCP_STREAM).
104 "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \
105 --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=$deep \
106 --client_channels=1 --bbuf_req_size=$big --bbuf_resp_size=$big \
107 --async_client_threads=1 --async_server_threads=1 --secure_test=$secure \
108 --num_servers=1 --num_clients=1
109
110 # Scenario 5: Sync unary ping-pong with protobufs
111 "$bins"/opt/qps_driver --rpc_type=UNARY --client_type=SYNC_CLIENT \
112 --server_type=SYNC_SERVER --outstanding_rpcs_per_channel=1 \
113 --client_channels=1 --simple_req_size=0 --simple_resp_size=0 \
114 --secure_test=$secure --num_servers=1 --num_clients=1
115
116 # Scenario 6: Sync streaming ping-pong with protobufs
117 "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=SYNC_CLIENT \
118 --server_type=SYNC_SERVER --outstanding_rpcs_per_channel=1 \
119 --client_channels=1 --simple_req_size=0 --simple_resp_size=0 \
120 --secure_test=$secure --num_servers=1 --num_clients=1
121
122 # Scenario 7: Async unary ping-pong with protobufs
123 "$bins"/opt/qps_driver --rpc_type=UNARY --client_type=ASYNC_CLIENT \
124 --server_type=ASYNC_SERVER --outstanding_rpcs_per_channel=1 \
125 --client_channels=1 --simple_req_size=0 --simple_resp_size=0 \
126 --async_client_threads=1 --async_server_threads=1 --secure_test=$secure \
127 --num_servers=1 --num_clients=1
128
129 # Scenario 8: Async streaming ping-pong with protobufs
130 "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \
131 --server_type=ASYNC_SERVER --outstanding_rpcs_per_channel=1 \
132 --client_channels=1 --simple_req_size=0 --simple_resp_size=0 \
133 --async_client_threads=1 --async_server_threads=1 --secure_test=$secure \
134 --num_servers=1 --num_clients=1
135
136 # Scenario 9: Crossbar QPS test
137 "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \
138 --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=$deep \
139 --client_channels=$wide --bbuf_req_size=0 --bbuf_resp_size=0 \
140 --async_client_threads=0 --async_server_threads=0 --secure_test=$secure \
141 --num_servers=$half --num_clients=0
142
143 # Scenario 10: Multi-channel bidir throughput test
144 "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \
145 --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=1 \
146 --client_channels=$wide --bbuf_req_size=$big --bbuf_resp_size=$big \
147 --async_client_threads=0 --async_server_threads=0 --secure_test=$secure \
148 --num_servers=1 --num_clients=1
149
150 # Scenario 11: Single-channel request throughput test
151 "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \
152 --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=$deep \
153 --client_channels=1 --bbuf_req_size=$big --bbuf_resp_size=0 \
154 --async_client_threads=1 --async_server_threads=1 --secure_test=$secure \
155 --num_servers=1 --num_clients=1
156
157 # Scenario 12: Single-channel response throughput test
158 "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \
159 --server_type=ASYNC_GENERIC_SERVER --outstanding_rpcs_per_channel=$deep \
160 --client_channels=1 --bbuf_req_size=0 --bbuf_resp_size=$big \
161 --async_client_threads=1 --async_server_threads=1 --secure_test=$secure \
162 --num_servers=1 --num_clients=1
163
164 # Scenario 13: Single-channel bidirectional protobuf throughput test
165 "$bins"/opt/qps_driver --rpc_type=STREAMING --client_type=ASYNC_CLIENT \
166 --server_type=ASYNC_SERVER --outstanding_rpcs_per_channel=$deep \
167 --client_channels=1 --simple_req_size=$big --simple_resp_size=$big \
168 --async_client_threads=1 --async_server_threads=1 --secure_test=$secure \
169 --num_servers=1 --num_clients=1
170 done
OLDNEW
« no previous file with comments | « third_party/grpc/test/cpp/qps/perf_db_client.cc ('k') | third_party/grpc/test/cpp/qps/qps_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698