Skip to content

Commit

Permalink
Fix various documentation issues, mostly spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberw committed Apr 21, 2024
1 parent 6fd4db5 commit 1a94044
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 28 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Locust's code base is intentionally kept small and doesn't solve everything out
## Authors

* Maintainer: [Lars Holmberg](https://github.com/cyberw)
* Modern UI: [Andrew Baldwin](https://github.com/andrewbaldwin44)
* UI: [Andrew Baldwin](https://github.com/andrewbaldwin44)
* Original creator: [Jonatan Heyman](https://github.com/heyman)
* Massive thanks to [all of our contributors](https://github.com/locustio/locust/graphs/contributors)

Expand Down
20 changes: 10 additions & 10 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ For full details of the Locust changelog, please see https://github.com/locustio
=====
* Pass --tags and --exclude-tags to workers. (https://github.com/locustio/locust/pull/1976)
* Clean up some logging messages (https://github.com/locustio/locust/pull/1973)
* Ensure heartbeat\_worker doesnt try to re-establish connection to workers when quit has been called (https://github.com/locustio/locust/pull/1972)
* Ensure heartbeat\_worker doesn't try to re-establish connection to workers when quit has been called (https://github.com/locustio/locust/pull/1972)
* fixed\_count: ability to spawn a specific number of users \(as opposed to just using weights\) (https://github.com/locustio/locust/pull/1964)

2.5.1
Expand Down Expand Up @@ -654,7 +654,7 @@ Other breaking changes
Web UI improvements
-------------------
* It's now possible to protect the Web UI with Basic Auth using hte ``--web-auth`` command line argument.
* It's now possible to protect the Web UI with Basic Auth using the ``--web-auth`` command line argument.
* The Web UI can now be served over HTTPS by specifying a TLS certificate and key with the ``--tls-cert``
and ``--tls-key`` command line arguments.
* If the number of users and hatch rate are specified on command line, it's now used to pre-populate the input fields in
Expand Down Expand Up @@ -709,7 +709,7 @@ Identical to previous version, but now built & deployed to Pypi using Travis.
0.13.2
======
* Fixed bug that broke the Web UI's repsonse time graph
* Fixed bug that broke the Web UI's response time graph
0.13.1
======
Expand Down Expand Up @@ -786,7 +786,7 @@ Identical to previous version, but now built & deployed to Pypi using Travis.
* Added sequential task support - https://github.com/locustio/locust/pull/827
* Added support for user-defined wait_function - https://github.com/locustio/locust/pull/785
* By default, Locust no longer resets the statistics when the hatching is complete.
Therefore :code:`--no-reset-stats` has been deprected (since it's now the default behaviour),
Therefore :code:`--no-reset-stats` has been deprecated (since it's now the default behaviour),
and instead a new :code:`--reset-stats` option has been added.
* Dropped support for Python 3.3
* Updated documentation
Expand All @@ -803,7 +803,7 @@ Identical to previous version, but now built & deployed to Pypi using Travis.
* Python 3 support
* Dropped support for Python 2.6
* Added :code:`--no-reset-stats` option for controling if the statistics should be reset once
* Added :code:`--no-reset-stats` option for controlling if the statistics should be reset once
the hatching is complete
* Added charts to the web UI for requests per second, average response time, and number of
simulated users.
Expand Down Expand Up @@ -851,15 +851,15 @@ Identical to previous version, but now built & deployed to Pypi using Travis.
* Fixed bug which caused the download time of the request body not to be included in the
reported response time.
* Fixed bug that occurred on some linux dists that were tampering with the python-requests
system package (removing dependencies which requests is bundling). This bug only occured
system package (removing dependencies which requests is bundling). This bug only occurred
when installing Locust in the python system packages, and not when using virtualenv.
* Various minor fixes and improvements.
0.7.1
=====
* Exceptions that occurs within TaskSets are now catched by default.
* Exceptions that occurs within TaskSets are now caught by default.
* Fixed bug which caused Min response time to always be 0 after all locusts had been hatched
and the statistics had been reset.
* Minor UI improvements in the web interface.
Expand All @@ -875,7 +875,7 @@ HTTP client functionality moved to HttpLocust
---------------------------------------------
Previously, the Locust class instantiated a :py:class:`HttpSession <locust.clients.HttpSession>`
under the client attribute that was used to make HTTP requests. This funcionality has
under the client attribute that was used to make HTTP requests. This functionality has
now been moved into the :py:class:`HttpLocust <locust.core.HttpLocust>` class, in an
effort to make it more obvious how one can use Locust to
:doc:`load test non-HTTP systems <testing-other-systems>`.
Expand Down Expand Up @@ -1085,7 +1085,7 @@ Locust now uses Requests
Locust's own HttpBrowser class (which was typically accessed through *self.client* from within a locust class)
has been replaced by a thin wrapper around the requests library (http://python-requests.org). This comes with
a number of advantages. Users can now take advantage of a well documented, well written, fully fledged
library for making HTTP requests. However, it also comes with some small API changes wich will require users
library for making HTTP requests. However, it also comes with some small API changes which will require users
to update their existing load testing scripts.
Gzip encoding turned on by default
Expand Down Expand Up @@ -1192,7 +1192,7 @@ Smaller API Changes
API changes
-----------
* Web inteface is now turned on by default. The **--web** command line option has been replaced by --no-web.
* Web interface is now turned on by default. The **--web** command line option has been replaced by --no-web.
* :func:`locust.events.request_success` and :func:`locust.events.request_failure` now gets the HTTP method as the first argument.
Improvements and bug fixes
Expand Down
16 changes: 7 additions & 9 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,9 @@ The Web UI will display:

|
With the new ``--modern-ui``, the class picker will addtionally allow for configuring any settings for each selected user.
This includes selecting tasks, configuring the weight or fixed count, and configuring the host.
The class picker additionally allows for disabling individual User tasks, changing the weight or fixed count, and configuring the host.

It is even possible to add custom arguments that you wish to be configurable for each user. Simply add a ``json`` classethod
It is even possible to add custom arguments that you wish to be configurable for each user. Simply add a ``json`` classmethod
to your user:

.. code-block:: python
Expand All @@ -216,8 +215,8 @@ to your user:
Configuration for the User classes
==================================

You can configure any settings you may wish for each user on the command line, the same as you may in the modern UI.
Using the ``--config-users`` argument, you may pass a JSON string or file with your user configuration. To configure
You can configure any settings you may wish for each user on the command line, the same as you may in the UI.
Using the ``--config-users`` argument, you can also pass a JSON string or file with your user configuration. To configure
multiple users you pass multiple arguments to ``--config-users`` or use a JSON Array.

Each user settings object must contain a key ``user_class_name``. This key corresponds to the class that you wish
Expand Down Expand Up @@ -269,10 +268,9 @@ The list of statistics parameters that can be modified is:
+-------------------------------------------+--------------------------------------------------------------------------------------+
| PERCENTILES_TO_REPORT | List of response time percentiles to be calculated & reported |
+-------------------------------------------+--------------------------------------------------------------------------------------+
| PERCENTILES_TO_CHART | List of response time percentiles in the screen of chart for Web UI |
| PERCENTILES_TO_CHART | List of response time percentiles in the screen of chart for UI |
+-------------------------------------------+--------------------------------------------------------------------------------------+
| MODERN_UI_PERCENTILES_TO_CHART | List of response time percentiles in the screen of chart for the modern Web UI |
| MODERN_UI_PERCENTILES_TO_CHART | List of response time percentiles in the screen of chart for the UI |
+-------------------------------------------+--------------------------------------------------------------------------------------+
| PERCENTILES_TO_STATISTICS | List of response time percentiles in the screen of statistics for Web UI |
| | This parameter supports only modern UI |
| PERCENTILES_TO_STATISTICS | List of response time percentiles in the screen of statistics for UI |
+-------------------------------------------+--------------------------------------------------------------------------------------+
2 changes: 1 addition & 1 deletion docs/extending-locust.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ source code.

* ``extend_modern_web_ui.py``: Display a table with content-length for each call.

* ``web_ui_cache_stats.py``: Display Varnish Hit/ Miss stats for each call. Could be easly extended to other CDN or cache proxies and gather other cache statistics such as cache age, control, ...
* ``web_ui_cache_stats.py``: Display Varnish Hit/Miss stats for each call. This could easily be extended to other CDN or cache proxies and gather other cache statistics such as cache age, control, ...

.. image:: images/extend_modern_web_ui_cache_stats.png

Expand Down
6 changes: 3 additions & 3 deletions docs/increase-performance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ For a complete example, see `rest.py <https://github.com/locustio/locust/blob/ma
Connection Handling
===================

By default a user will reuse the same TCP/HTTP connection if possible. To more realistically simulate new users connecting to your application this connection can be manually closed.
By default a User will reuse the same TCP/HTTP connection (unless it breaks somehow). To more realistically simulate new browsers connecting to your application this connection can be manually closed.

.. code-block:: python
@task
def t(self):
self.client.client.clientpool.close()
self.client.get("/") # Here a new connection will be created
self.client.client.clientpool.close() # self.client.client is not a typo
self.client.get("/") # Here a new connection will be created
API
Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A Locust test is essentially just a Python program making requests to the system
self.client.get("/hello")
self.client.get("/world")
This user will make an HTTP request to ``/hello``, and after that to ``/world``, and then repeat. For a full explanation and a more realistic example see :ref:`writing-a-locustfile`.
This user will make an HTTP request to ``/hello``, then to ``/world``, and then repeat. For a full explanation and a more realistic example see :ref:`writing-a-locustfile`.

Change ``/hello`` and ``/world`` to some actual paths on the web site/service you want to test, put the code in a file named ``locustfile.py`` in your current directory and then run ``locust``:

Expand Down
2 changes: 1 addition & 1 deletion docs/writing-a-locustfile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ is executed. For more info see :ref:`wait-time`.
Methods decorated with ``@task`` are the core of your locust file. For every running User,
Locust creates a `greenlet <https://greenlet.readthedocs.io/en/stable/greenlet.html>`_ (a coroutine or "micro-thread"), that will call those methods.
Code within a task is executed sequentially (it is just regular Python code),
so ``/world`` wont be called until the response from ``/hello`` has been received.
so ``/world`` won't be called until the response from ``/hello`` has been received.

.. code-block:: python
Expand Down
2 changes: 1 addition & 1 deletion locust/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def kill_workers(children):
exit_code = max(exit_code, child_exit_code)
if exit_code > 1:
logging.error(f"Bad response code from worker children: {exit_code}")
# ensure master doesnt finish until output from workers has arrived
# ensure master doesn't finish until output from workers has arrived
# otherwise the terminal might look weird.
time.sleep(0.1)

Expand Down
2 changes: 1 addition & 1 deletion locust/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def __init__(
environment: Reference to the current Locust Environment
host: Host/interface that the web server should accept connections to
port: Port that the web server should listen to
web_login: Enables a login page for the modern UI
web_login: Enables a login page
tls_cert: A path to a TLS certificate
tls_key: A path to a TLS private key
delayed_start: Whether or not to delay starting web UI until `start()` is called. Delaying web UI start
Expand Down

0 comments on commit 1a94044

Please sign in to comment.