forked from google/distbench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
simple_test.sh
executable file
·115 lines (110 loc) · 3.1 KB
/
simple_test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#!/bin/bash
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This is a simple test, doing a search like pattern but with all the services
# located on a single node.
# This script require that the test sequencer and node manager be started on
# localhost prior to invoking the RPC below. You can either do it manually as
# shown below or by using the start_distbench_localhost.sh script.
#
# To start the test_sequencer run the following in a dedicated terminal:
# bazel run :distbench -- test_sequencer
# To start the node manager run the following in a dedicated terminal:
# bazel run :distbench -- node_manager --test_sequencer=localhost:10000 --port=9999
grpc_cli \
--channel_creds_type=insecure \
call localhost:10000 \
distbench.DistBenchTestSequencer.RunTestSequence \
<<EOF
tests {
services {
name: "load_balancer"
count: 1
}
services {
name: "root"
count: 1
}
services {
name: "leaf"
count: 3
}
node_service_bundles {
key: "node0"
value: {
services: "load_balancer/0"
services: "root/0"
services: "leaf/0"
services: "leaf/1"
services: "leaf/2"
}
}
action_lists {
name: "load_balancer"
action_names: "load_balancer/do_closed_loop_root_queries"
action_names: "load_balancer/do_closed_loop_root_queries_again"
}
actions {
name: "load_balancer/do_closed_loop_root_queries"
iterations {
max_iteration_count: 3
max_parallel_iterations: 3
}
rpc_name: "root_query"
}
actions {
name: "load_balancer/do_closed_loop_root_queries_again"
dependencies : "load_balancer/do_closed_loop_root_queries"
iterations {
#max_iteration_count: 3
max_duration_us: 3000000
open_loop_interval_ns: 1000000000
open_loop_interval_distribution: "sync_burst"
}
action_list_name: "load_balancer/root_query_al"
}
action_lists {
name: "load_balancer/root_query_al"
action_names: "load_balancer/do_closed_loop_root_queries"
#action_names: "root/root_query_fanout"
}
rpc_descriptions {
name: "root_query"
client: "load_balancer"
server: "root"
fanout_filter: "round_robin"
tracing_interval: 2
}
action_lists {
name: "root_query"
action_names: "root/root_query_fanout"
# Should be able to use an action name in-place of a single entry action list?
}
actions {
name: "root/root_query_fanout"
rpc_name: "leaf_query"
}
rpc_descriptions {
name: "leaf_query"
client: "root"
server: "leaf"
fanout_filter: "all"
tracing_interval: 2
}
action_lists {
name: "leaf_query"
# no actions, NOP
}
}
EOF