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

Group related command line options together #1311

Merged
merged 9 commits into from
Apr 6, 2020
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ For full details of the Locust changelog, please see https://github.com/locustio
Breaking changes
----------------

* The option for running Locust without the Web UI has been renamed from ``--no-web`` to ``--headless``.
* Removed ``Locust.setup``, ``Locust.teardown``, ``TaskSet.setup`` and ``TaskSet.teardown`` hooks. If you want to
run code at the start or end of a test, you should instead use the :py:attr:`test_start <locust.event.Events.test_start>`
and :py:attr:`test_stop <locust.event.Events.test_stop>` events:
Expand Down
4 changes: 2 additions & 2 deletions docs/retrieving-stats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ You may wish to consume your Locust results via a CSV file. In this case, there
First, when running Locust with the web UI, you can retrieve CSV files under the Download Data tab.

Secondly, you can run Locust with a flag which will periodically save two CSV files. This is particularly useful
if you plan on running Locust in an automated way with the ``--no-web`` flag:
if you plan on running Locust in an automated way with the ``--headless`` flag:

.. code-block:: console

$ locust -f examples/basic.py --csv=example --no-web -t10m
$ locust -f examples/basic.py --csv=example --headless -t10m

The files will be named ``example_response_times.csv`` and ``example_stats.csv`` (when using ``--csv=example``) and mirror Locust's built in stat pages.

Expand Down
2 changes: 1 addition & 1 deletion docs/running-locust-distributed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ listen to. Defaults to 5557.
``--expect-workers=X``
----------------------

Used when starting the master node with ``--no-web``. The master node will then wait until X worker
Used when starting the master node with ``--headless``. The master node will then wait until X worker
nodes has connected before the test is started.


Expand Down
2 changes: 1 addition & 1 deletion docs/running-locust-docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ To run in standalone mode without the web UI, you can use the ``LOCUST_OPTS`` en

.. code-block:: console

docker run --volume $PWD/dir/of/locustfile:/mnt/locust -e LOCUSTFILE_PATH=/mnt/locust/locustfile.py -e TARGET_URL=https://abc.com -e LOCUST_OPTS="--clients=10 --no-web --run-time=600" locustio/locust
docker run --volume $PWD/dir/of/locustfile:/mnt/locust -e LOCUSTFILE_PATH=/mnt/locust/locustfile.py -e TARGET_URL=https://abc.com -e LOCUST_OPTS="--clients=10 --headless --run-time=600" locustio/locust


If you are Kubernetes user, you can use the `Helm chart <https://github.com/helm/charts/tree/master/stable/locust>`_ to scale and run locust.
2 changes: 1 addition & 1 deletion docs/running-locust-in-step-load-mode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ If you want to run Locust in step load mode without the web UI, you can do that

.. code-block:: console

$ locust -f --no-web -c 1000 -r 100 --run-time 1h30m --step-load --step-clients 300 --step-time 20m
$ locust -f --headless -c 1000 -r 100 --run-time 1h30m --step-load --step-clients 300 --step-time 20m

Locust will swarm the clients by step and shutdown once the time is up.

Expand Down
8 changes: 4 additions & 4 deletions docs/running-locust-without-web-ui.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Running Locust without the web UI
=================================

You can run locust without the web UI - for example if you want to run it in some automated flow,
like a CI server - by using the ``--no-web`` flag together with ``-c`` and ``-r``:
like a CI server - by using the ``--headless`` flag together with ``-c`` and ``-r``:

.. code-block:: console

$ locust -f locust_files/my_locust_file.py --no-web -c 1000 -r 100
$ locust -f locust_files/my_locust_file.py --headless -c 1000 -r 100

``-c`` specifies the number of Locust users to spawn, and ``-r`` specifies the hatch rate
(number of users to spawn per second).
Expand All @@ -22,7 +22,7 @@ If you want to specify the run time for a test, you can do that with ``--run-tim

.. code-block:: console

$ locust -f --no-web -c 1000 -r 100 --run-time 1h30m
$ locust -f --headless -c 1000 -r 100 --run-time 1h30m

Locust will shutdown once the time is up.

Expand All @@ -33,7 +33,7 @@ By default, locust will stop your tasks immediately. If you want to allow your t

.. code-block:: console

$ locust -f --no-web -c 1000 -r 100 --run-time 1h30m --stop-timeout 99
$ locust -f --headless -c 1000 -r 100 --run-time 1h30m --stop-timeout 99

.. _running-locust-distributed-without-web-ui:

Expand Down
Loading