locust 2.37.12.dev5__py3-none-any.whl → 2.37.13__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- locust/_version.py +2 -2
- locust/contrib/fasthttp.py +11 -1
- locust/html.py +6 -7
- locust/main.py +1 -1
- locust/stats.py +6 -8
- locust/web.py +2 -3
- locust/webui/dist/assets/index-Bb3SQx2B.js +212 -0
- locust/webui/dist/auth.html +1 -1
- locust/webui/dist/index.html +1 -1
- locust/webui/dist/report.html +11 -117
- {locust-2.37.12.dev5.dist-info → locust-2.37.13.dist-info}/METADATA +2 -2
- {locust-2.37.12.dev5.dist-info → locust-2.37.13.dist-info}/RECORD +15 -15
- locust/webui/dist/assets/index-D212gD6O.js +0 -233
- {locust-2.37.12.dev5.dist-info → locust-2.37.13.dist-info}/WHEEL +0 -0
- {locust-2.37.12.dev5.dist-info → locust-2.37.13.dist-info}/entry_points.txt +0 -0
- {locust-2.37.12.dev5.dist-info → locust-2.37.13.dist-info}/licenses/LICENSE +0 -0
locust/_version.py
CHANGED
@@ -17,5 +17,5 @@ __version__: str
|
|
17
17
|
__version_tuple__: VERSION_TUPLE
|
18
18
|
version_tuple: VERSION_TUPLE
|
19
19
|
|
20
|
-
__version__ = version = '2.37.
|
21
|
-
__version_tuple__ = version_tuple = (2, 37,
|
20
|
+
__version__ = version = '2.37.13'
|
21
|
+
__version_tuple__ = version_tuple = (2, 37, 13)
|
locust/contrib/fasthttp.py
CHANGED
@@ -378,7 +378,17 @@ class FastHttpUser(User):
|
|
378
378
|
"""Parameter passed to FastHttpSession"""
|
379
379
|
|
380
380
|
client_pool: HTTPClientPool | None = None
|
381
|
-
"""HTTP client pool to use. If not given, a new pool is created per single user.
|
381
|
+
"""HTTP client pool to use. If not given, a new pool is created per single user.
|
382
|
+
|
383
|
+
For example, to have all instances of MyUser share a single HTTP client pool with concurrency of 5, you would do:
|
384
|
+
|
385
|
+
.. code-block:: python
|
386
|
+
|
387
|
+
from geventhttpclient.client import HTTPClientPool
|
388
|
+
|
389
|
+
class MyUser(FastHttpUser):
|
390
|
+
client_pool = HTTPClientPool(concurrency=5)
|
391
|
+
"""
|
382
392
|
|
383
393
|
ssl_context_factory: Callable | None = None
|
384
394
|
"""A callable that return a SSLContext for overriding the default context created by the FastHttpSession."""
|
locust/html.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
import os
|
2
|
-
from html import escape
|
3
2
|
from itertools import chain
|
4
3
|
|
5
4
|
from jinja2 import Environment as JinjaEnvironment
|
@@ -81,13 +80,13 @@ def get_html_report(
|
|
81
80
|
"report.html",
|
82
81
|
template_args={
|
83
82
|
"is_report": True,
|
84
|
-
"requests_statistics": [stat.to_dict(
|
83
|
+
"requests_statistics": [stat.to_dict() for stat in requests_statistics],
|
85
84
|
"failures_statistics": [stat.to_dict() for stat in failures_statistics],
|
86
85
|
"exceptions_statistics": [stat for stat in exceptions_statistics],
|
87
86
|
"response_time_statistics": [
|
88
87
|
{
|
89
|
-
"name":
|
90
|
-
"method":
|
88
|
+
"name": stat.name,
|
89
|
+
"method": stat.method or "",
|
91
90
|
**{
|
92
91
|
str(percentile): stat.get_response_time_percentile(percentile)
|
93
92
|
for percentile in PERCENTILES_FOR_HTML_REPORT
|
@@ -98,13 +97,13 @@ def get_html_report(
|
|
98
97
|
"start_time": start_time,
|
99
98
|
"end_time": end_time,
|
100
99
|
"duration": format_duration(request_stats.start_time, end_ts),
|
101
|
-
"host":
|
100
|
+
"host": str(host),
|
102
101
|
"history": history,
|
103
102
|
"show_download_link": show_download_link,
|
104
|
-
"locustfile":
|
103
|
+
"locustfile": str(environment.locustfile),
|
105
104
|
"tasks": task_data,
|
106
105
|
"percentiles_to_chart": stats.PERCENTILES_TO_CHART,
|
107
|
-
"profile":
|
106
|
+
"profile": str(environment.profile) if environment.profile else None,
|
108
107
|
},
|
109
108
|
theme=theme,
|
110
109
|
)
|
locust/main.py
CHANGED
@@ -674,7 +674,7 @@ See https://github.com/locustio/locust/wiki/Installation#increasing-maximum-numb
|
|
674
674
|
|
675
675
|
try:
|
676
676
|
if options.class_picker:
|
677
|
-
logger.
|
677
|
+
logger.debug("Locust is running with the UserClass Picker Enabled")
|
678
678
|
if options.autostart and not options.headless:
|
679
679
|
start_automatic_run()
|
680
680
|
|
locust/stats.py
CHANGED
@@ -11,7 +11,6 @@ import time
|
|
11
11
|
from abc import abstractmethod
|
12
12
|
from collections import OrderedDict, defaultdict, namedtuple
|
13
13
|
from copy import copy
|
14
|
-
from html import escape
|
15
14
|
from itertools import chain
|
16
15
|
from typing import TYPE_CHECKING, Protocol, TypedDict, TypeVar, cast
|
17
16
|
|
@@ -673,9 +672,8 @@ class StatsEntry:
|
|
673
672
|
}
|
674
673
|
|
675
674
|
return {
|
676
|
-
"method":
|
677
|
-
"name":
|
678
|
-
"safe_name": escape(self.name, quote=False),
|
675
|
+
"method": self.method,
|
676
|
+
"name": self.name,
|
679
677
|
"num_requests": self.num_requests,
|
680
678
|
"num_failures": self.num_failures,
|
681
679
|
"min_response_time": 0 if self.min_response_time is None else proper_round(self.min_response_time),
|
@@ -756,11 +754,11 @@ class StatsError:
|
|
756
754
|
def unserialize(cls, data: StatsErrorDict) -> StatsError:
|
757
755
|
return cls(data["method"], data["name"], data["error"], data["occurrences"])
|
758
756
|
|
759
|
-
def to_dict(self
|
757
|
+
def to_dict(self):
|
760
758
|
return {
|
761
|
-
"method":
|
762
|
-
"name":
|
763
|
-
"error":
|
759
|
+
"method": self.method,
|
760
|
+
"name": self.name,
|
761
|
+
"error": self.parse_error(self.error),
|
764
762
|
"occurrences": self.occurrences,
|
765
763
|
}
|
766
764
|
|
locust/web.py
CHANGED
@@ -7,7 +7,6 @@ import logging
|
|
7
7
|
import mimetypes
|
8
8
|
import os.path
|
9
9
|
from functools import wraps
|
10
|
-
from html import escape
|
11
10
|
from io import StringIO
|
12
11
|
from json import dumps
|
13
12
|
from typing import TYPE_CHECKING, Any, TypedDict
|
@@ -512,8 +511,8 @@ class WebUI:
|
|
512
511
|
"exceptions": [
|
513
512
|
{
|
514
513
|
"count": row["count"],
|
515
|
-
"msg":
|
516
|
-
"traceback":
|
514
|
+
"msg": row["msg"],
|
515
|
+
"traceback": row["traceback"],
|
517
516
|
"nodes": ", ".join(row["nodes"]),
|
518
517
|
}
|
519
518
|
for row in (environment.runner.exceptions.values() if environment.runner is not None else [])
|