Skip to content
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

Added explicitly set timescale. #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
20 changes: 20 additions & 0 deletions locust_swarm/swarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ def parse(self, stream):
default=False,
help="Upload locust-plugins to load gens (useful if you are developing locust-plugins)",
)
parser.add_argument(
"--timescale",
action="store_true",
default=False,
help="Explicitly enable timescale plugin on master/workers nodes",
)

parser.add_argument(
"--version",
Expand Down Expand Up @@ -373,6 +379,12 @@ def start_worker_process(server, port):
if args.test_env:
extra_env.append("LOCUST_TEST_ENV=" + args.test_env)

timescale_args = []
if args.timescale:
timescale_args = [
"--timescale",
]

cmd = " ".join([
"ssh",
"-q",
Expand All @@ -388,6 +400,7 @@ def start_worker_process(server, port):
"--master-port",
str(port),
*master_parameters,
*timescale_args,
"--headless",
"--expect-workers-max-wait",
"30",
Expand Down Expand Up @@ -520,6 +533,12 @@ def get_available_servers_and_lock_them():
if args.playwright:
extra_env.append("LOCUST_PLAYWRIGHT=1")

timescale_args = []
if args.timescale:
timescale_args = [
"--timescale",
]

master_command = [
*ssh_command,
*extra_env,
Expand All @@ -532,6 +551,7 @@ def get_available_servers_and_lock_them():
str(worker_process_count),
"--expect-workers-max-wait",
"60",
*timescale_args,
"--headless",
"-f",
locustfile,
Expand Down
Loading