id = "locust" name = "Locust" homepage = "https://locust.io" description = "An open source load testing tool: define user behaviour with Python code, and swarm your system with millions of simultaneous users." icon = "SimpleIcons:locust" executables = ["locust"] [dotfiles] # https://docs.locust.io/en/stable/configuration.html, "Configuration file": # "Locust will look for ~/.locust.conf, ./locust.conf and ./pyproject.toml by # default. You can specify an additional file using the --config flag." Only # the first of the three is per-user; locust.conf and pyproject.toml belong to # a project directory. The file is the key = value config format, one option # per line, the same names as the command line flags. paths = ["~/.locust.conf"] exclude = [] # The options in this file are run parameters — user count, spawn rate, run # time, which locustfile to load. Locust has no credential file of its own. secret = [] # Read once when a run starts, by a process that exits when the run ends. side_effect = false # No machine_lines. `locustfile` and `host` are the two candidates and neither # holds up: locustfile is normally a project-relative path, and host names the # system under test, which is the same target from whichever machine the run # is started. [commands] format = 1 label = "Run load test" description = "Run a locustfile, with the web UI or headless. Distributed master/worker options, TLS and logging flags are left out." quality = "ai-draft" base = "fig:locust" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/locust.ts" license = "MIT" [[commands.field]] id = "locustfile" label = "Locustfile" type = "path" option = ["--locustfile", "-f"] path = { kind = "file", role = "input" } sources = ["fig"] [[commands.field]] id = "host" label = "Target host" description = "For example http://10.21.32.33" type = "string" option = ["--host", "-H"] sources = ["fig"] [[commands.field]] id = "users" label = "Peak concurrent users" type = "integer" option = ["--users", "-u"] sources = ["fig"] [[commands.field]] id = "spawn_rate" label = "Spawn rate (users per second)" type = "number" option = ["--spawn-rate", "-r"] sources = ["fig"] [[commands.field]] id = "run_time" label = "Run time" description = "For example 300s, 20m, 1h30m." type = "string" option = ["--run-time", "-t"] sources = ["fig"] [[commands.field]] id = "headless" label = "Headless (no web UI)" type = "boolean" option = ["--headless"] sources = ["fig"] [[commands.field]] id = "web_port" label = "Web UI port" type = "integer" option = ["--web-port", "-P"] sources = ["fig"] [[commands.field]] id = "csv" label = "CSV stats prefix" type = "string" option = ["--csv"] sources = ["fig"] [[commands.field]] id = "html" label = "HTML report file" type = "path" option = ["--html"] path = { kind = "file", role = "output" } effect = "overwrite" sources = ["fig"] [[commands.field]] id = "only_summary" label = "Only print summary" type = "boolean" option = ["--only-summary"] sources = ["fig"] [[commands.task]] id = "headless_run" label = "Headless run" fields = ["locustfile", "host", "users", "spawn_rate", "run_time", "headless"] required = ["locustfile", "host", "users", "spawn_rate", "run_time"] set = { headless = [true] } [[commands.task]] id = "web_ui" label = "Web UI" fields = ["locustfile", "host", "web_port"] required = ["locustfile"] [[commands.group]] id = "basic" label = "Basic" fields = ["locustfile", "host", "users", "spawn_rate", "run_time", "headless"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["web_port", "csv", "html", "only_summary"]