Skip to content

Commit

Permalink
Change default number of loadgens from crashing to mean all of them.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberw committed Jan 14, 2024
1 parent 9155262 commit 4c0f894
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ options:
--loadgen-list LOADGEN_LIST
A comma-separated list of ssh servers on which to launch locust workers
--loadgens LOADGENS, -l LOADGENS
Number of servers to run locust workers on
Number of servers to run locust workers on. Defaults to -1, meaning all of them.
--processes PROCESSES
This is passed on to locust unchanged and determines the number of worker processes per load generator.
--selenium Start selenium server on load gens for use with locust-plugins's WebdriverUser
Expand Down
8 changes: 4 additions & 4 deletions locust_swarm/swarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
"--loadgens",
"-l",
type=int,
default=1,
help="Number of servers to run locust workers on",
default=-1,
help="Number of servers to run locust workers on. Defaults to -1, meaning all of them.",
)
parser.add_argument(
"--processes-per-loadgen",
Expand Down Expand Up @@ -381,10 +381,10 @@ def main():
parser.error(
f"--processes-per-loadgen has been removed in favour of locusts native --processes parameter (you had it set to {args.processes_per_loadgen})"
)
if args.loadgens < 1:
parser.error("loadgens parameter must be 1 or higher")
worker_process_count = args.processes * args.loadgens
loadgen_list = args.loadgen_list.split(",")
if args.loadgens < 0:
args.loadgens = len(loadgen_list)

try:
subprocess.check_output(
Expand Down

0 comments on commit 4c0f894

Please sign in to comment.