Skip to content

Add warning when benchmarking multiple target hosts #779

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions osbenchmark/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,19 @@ def configure_builder_params(args, cfg, command_requires_provision_config_instan


def configure_connection_params(arg_parser, args, cfg):
# Check if multiple hosts are specified using comma separator
if args.target_hosts and "," in args.target_hosts:
console.warn(
"WARNING: Benchmark runs with multiple target hosts should be passed in as a JSON file such as:\n"
"{\n"
' "default": [\n'
' {"host": "127.0.0.1", "port": 9200} # Specify nodes for cluster 1\n'
" ],\n"
' "remote":[\n'
' {"host": "10.127.0.3", "port": 9200} # Specify nodes for cluster 2\n'
" ]\n"
"}"
)
# Also needed by builder (-> telemetry) - duplicate by module?
target_hosts = opts.TargetHosts(args.target_hosts)
cfg.add(config.Scope.applicationOverride, "client", "hosts", target_hosts)
Expand Down
Loading