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

Use 1 as default in web UI start form + lots of documentation updates #1836

2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -51,7 +51,7 @@ Even though Locust primarily works with web sites/services, it can be used to te

## Hackable

Locust is small and very flexible and we intend to keep it that way. If you want to [send reporting data to that database & graphing system you like](https://github.com/SvenskaSpel/locust-plugins/blob/master/locust_plugins/listeners.py), wrap calls to a REST API to handle the particulars of your system or run a [totally custom load pattern](https://docs.locust.io/en/latest/generating-custom-load-shape.html#generating-custom-load-shape), there is nothing stopping you!
Locust is small and very flexible and we intend to keep it that way. If you want to [send reporting data to that database & graphing system you like](https://github.com/SvenskaSpel/locust-plugins/blob/master/locust_plugins/listeners.py), wrap calls to a REST API to handle the particulars of your system or run a [totally custom load pattern](https://docs.locust.io/en/latest/custom-load-shape.html#custom-load-shape), there is nothing stopping you!

## Links

Expand Down
12 changes: 11 additions & 1 deletion docs/conf.py
Expand Up @@ -79,7 +79,13 @@ def save_locust_env_variables():

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ["sphinx.ext.autodoc", "sphinx.ext.intersphinx", "sphinx_search.extension"]
extensions = [
"sphinx-prompt",
"sphinx_substitution_extensions",
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx_search.extension",
]

# autoclass options
# autoclass_content = "both"
Expand Down Expand Up @@ -169,3 +175,7 @@ def save_locust_env_variables():

# The name of the Pygments (syntax highlighting) style to use.
# pygments_style = 'trac'

rst_prolog = f"""
.. |version| replace:: {__version__}
"""
2 changes: 1 addition & 1 deletion docs/configuration.rst
Expand Up @@ -66,7 +66,7 @@ Example:

Configuration values are read (overridden) in the following order:

.. code-block::
.. code-block:: console

~/locust.conf -> ./locust.conf -> (file specified using --conf) -> env vars -> cmd args

Expand Down
@@ -1,8 +1,8 @@
.. _generating-custom-load-shape:
.. _custom-load-shape:

==============================
Generating a custom load shape
==============================
==================
Custom load shapes
==================

Sometimes a completely custom shaped load test is required that cannot be achieved by simply setting or changing the user count and spawn rate. For example, you might want to generate a load spike or ramp up and down at custom times. By using a `LoadTestShape` class you have full control over the user count and spawn rate at all times.

Expand Down
29 changes: 22 additions & 7 deletions docs/developing-locust-itself.rst → docs/developing-locust.rst
@@ -1,19 +1,34 @@
=======================================
Developing Locust itself
=======================================
.. _developing-locust:

Here's useful information on making changes to Locust.
=================
Developing Locust
=================

You want to contribute to Locust? Great! Here is a list of `open bugs/feature requests <https://github.com/locustio/locust/>`_.

Install Locust for development
==============================

Fork Locust on `Github <https://github.com/locustio/locust/>`_ and then run

.. code-block:: console

$ git clone git://github.com/<YourName>/locust.git # clone the repo
$ pip3 install -e locust/ # install in editable mode

Now the ``locust`` command will run *your* code with no need for reinstalling after making changes.

Before you open a pull request, make sure the tests work. And if you are adding a feature, make sure it is documented.

Running tests
=============

To be able to run Locust's test on different Python versions we use `tox <https://tox.readthedocs.io/en/latest/>`_.
To be able to run Locust's test on different Python versions we use `tox <https://tox.readthedocs.io/en/stable/>`_.
You can install tox by running:

.. code-block:: console

pip install tox
pip3 install tox

Then you can run the tests by just invoking tox in the Locust project root directory:

Expand All @@ -30,7 +45,7 @@ the following command in the Locust project's root directory:

.. code-block:: console

pip install -r docs/requirements.txt
pip3 install -r docs/requirements.txt

Then you can build the documentation locally using:

Expand Down
Binary file added docs/images/number_of_users.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/response_times.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/total_requests_per_second.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/webui-running-charts.png
Binary file not shown.
Binary file modified docs/images/webui-running-statistics.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/webui-splash-screenshot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions docs/index.rst
Expand Up @@ -40,8 +40,7 @@ Running your Locust tests
configuration
running-locust-distributed
running-locust-docker
running-locust-without-web-ui
increase-performance
running-without-web-ui


Other functionalities
Expand All @@ -50,9 +49,10 @@ Other functionalities
.. toctree ::
:maxdepth: 2

generating-custom-load-shape
custom-load-shape
retrieving-stats
testing-other-systems
increase-performance
extending-locust
logging
use-as-lib
Expand All @@ -64,7 +64,7 @@ Further reading / knowledgebase
.. toctree ::
:maxdepth: 1

developing-locust-itself
developing-locust
further-reading


Expand Down
17 changes: 12 additions & 5 deletions docs/installation.rst
Expand Up @@ -3,26 +3,33 @@
Installation
============

`Install Python <https://docs.python-guide.org/starting/installation/>`_ 3.6 or later.
`Install Python <https://docs.python-guide.org/starting/installation/>`_ 3.6 or later, if you dont already have it.

Install Locust using pip.
Install Locust:

.. code-block:: console

$ pip3 install locust

Validate your installation and show the Locust version number:
Validate your installation. If this doesnt work, `check the wiki <https://github.com/locustio/locust/wiki/Installation>`_ for some possible solutions.

.. code-block:: console
:substitutions:

$ locust -V
locust |version|

If everything worked, move on to :ref:`quickstart`. If it did not, check out `the wiki <https://github.com/locustio/locust/wiki/Installation>`_ for some solutions.
Great! Now we're ready to create our first test: :ref:`quickstart`

Bleeding edge version
---------------------
If you need some feature or fix not yet part of a release:

.. code-block:: console

$ pip3 install -e git://github.com/locustio/locust.git@master#egg=locust
$ pip3 install -e git://github.com/locustio/locust.git@master#egg=locust

Install for development
-----------------------

If you want to modify Locust or contribute to the project, see :ref:`developing-locust`.