Skip to content

Commit 4878e91

Browse files
authored
Add warning when benchmarking multiple target hosts (#779)
Signed-off-by: Michael Oviedo <[email protected]>
1 parent 9eaa5f7 commit 4878e91

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

osbenchmark/benchmark.py

+13
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,19 @@ def configure_builder_params(args, cfg, command_requires_provision_config_instan
876876

877877

878878
def configure_connection_params(arg_parser, args, cfg):
879+
# Check if multiple hosts are specified using comma separator
880+
if args.target_hosts and "," in args.target_hosts:
881+
console.warn(
882+
"WARNING: Benchmark runs with multiple target hosts should be passed in as a JSON file such as:\n"
883+
"{\n"
884+
' "default": [\n'
885+
' {"host": "127.0.0.1", "port": 9200} # Specify nodes for cluster 1\n'
886+
" ],\n"
887+
' "remote":[\n'
888+
' {"host": "10.127.0.3", "port": 9200} # Specify nodes for cluster 2\n'
889+
" ]\n"
890+
"}"
891+
)
879892
# Also needed by builder (-> telemetry) - duplicate by module?
880893
target_hosts = opts.TargetHosts(args.target_hosts)
881894
cfg.add(config.Scope.applicationOverride, "client", "hosts", target_hosts)

0 commit comments

Comments
 (0)