locust 2.27.1.dev20__py3-none-any.whl → 2.27.1.dev29__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/argument_parser.py +2 -1
- locust/html.py +2 -1
- locust/main.py +3 -1
- locust/stats.py +21 -17
- locust/web.py +3 -2
- {locust-2.27.1.dev20.dist-info → locust-2.27.1.dev29.dist-info}/METADATA +2 -2
- {locust-2.27.1.dev20.dist-info → locust-2.27.1.dev29.dist-info}/RECORD +12 -12
- {locust-2.27.1.dev20.dist-info → locust-2.27.1.dev29.dist-info}/LICENSE +0 -0
- {locust-2.27.1.dev20.dist-info → locust-2.27.1.dev29.dist-info}/WHEEL +0 -0
- {locust-2.27.1.dev20.dist-info → locust-2.27.1.dev29.dist-info}/entry_points.txt +0 -0
- {locust-2.27.1.dev20.dist-info → locust-2.27.1.dev29.dist-info}/top_level.txt +0 -0
locust/_version.py
CHANGED
@@ -12,5 +12,5 @@ __version__: str
|
|
12
12
|
__version_tuple__: VERSION_TUPLE
|
13
13
|
version_tuple: VERSION_TUPLE
|
14
14
|
|
15
|
-
__version__ = version = '2.27.1.
|
16
|
-
__version_tuple__ = version_tuple = (2, 27, 1, '
|
15
|
+
__version__ = version = '2.27.1.dev29'
|
16
|
+
__version_tuple__ = version_tuple = (2, 27, 1, 'dev29')
|
locust/argument_parser.py
CHANGED
@@ -9,6 +9,7 @@ import atexit
|
|
9
9
|
import os
|
10
10
|
import platform
|
11
11
|
import socket
|
12
|
+
import ssl
|
12
13
|
import sys
|
13
14
|
import tempfile
|
14
15
|
import textwrap
|
@@ -705,7 +706,7 @@ Typically ONLY these options (and --locustfile) need to be specified on workers,
|
|
705
706
|
"-V",
|
706
707
|
action="version",
|
707
708
|
help="Show program's version number and exit",
|
708
|
-
version=f"locust {version} from {os.path.dirname(__file__)} (
|
709
|
+
version=f"locust {version} from {os.path.dirname(__file__)} (Python {platform.python_version()}, {' '.join(ssl.OPENSSL_VERSION.split(' ')[0:2])})",
|
709
710
|
)
|
710
711
|
other_group.add_argument(
|
711
712
|
"--exit-code-on-error",
|
locust/html.py
CHANGED
@@ -10,7 +10,7 @@ from jinja2 import Environment, FileSystemLoader
|
|
10
10
|
|
11
11
|
from . import stats as stats_module
|
12
12
|
from .runners import STATE_STOPPED, STATE_STOPPING, MasterRunner
|
13
|
-
from .stats import sort_stats
|
13
|
+
from .stats import sort_stats, update_stats_history
|
14
14
|
from .user.inspectuser import get_ratio
|
15
15
|
|
16
16
|
PERCENTILES_FOR_HTML_REPORT = [0.50, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99, 1.0]
|
@@ -54,6 +54,7 @@ def get_html_report(
|
|
54
54
|
{**exc, "nodes": ", ".join(exc["nodes"])} for exc in environment.runner.exceptions.values()
|
55
55
|
]
|
56
56
|
|
57
|
+
update_stats_history(environment.runner)
|
57
58
|
history = stats.history
|
58
59
|
|
59
60
|
static_js = []
|
locust/main.py
CHANGED
@@ -434,7 +434,9 @@ See https://github.com/locustio/locust/wiki/Installation#increasing-maximum-numb
|
|
434
434
|
try:
|
435
435
|
options.run_time = parse_timespan(options.run_time)
|
436
436
|
except ValueError:
|
437
|
-
logger.error(
|
437
|
+
logger.error(
|
438
|
+
f"Invalid --run-time argument ({options.run_time}), accepted formats are for example 120, 120s, 2m, 3h, 3h30m10s."
|
439
|
+
)
|
438
440
|
sys.exit(1)
|
439
441
|
|
440
442
|
if options.csv_prefix:
|
locust/stats.py
CHANGED
@@ -907,28 +907,32 @@ def sort_stats(stats: dict[Any, S]) -> list[S]:
|
|
907
907
|
return [stats[key] for key in sorted(stats.keys())]
|
908
908
|
|
909
909
|
|
910
|
+
def update_stats_history(runner: Runner) -> None:
|
911
|
+
stats = runner.stats
|
912
|
+
current_response_time_percentiles = {
|
913
|
+
f"response_time_percentile_{percentile}": stats.total.get_current_response_time_percentile(percentile) or 0
|
914
|
+
for percentile in PERCENTILES_TO_CHART
|
915
|
+
}
|
916
|
+
|
917
|
+
r = {
|
918
|
+
**current_response_time_percentiles,
|
919
|
+
"time": datetime.datetime.now(tz=datetime.timezone.utc).strftime("%H:%M:%S"),
|
920
|
+
"current_rps": stats.total.current_rps or 0,
|
921
|
+
"current_fail_per_sec": stats.total.current_fail_per_sec or 0,
|
922
|
+
"total_avg_response_time": stats.total.avg_response_time,
|
923
|
+
"user_count": runner.user_count or 0,
|
924
|
+
}
|
925
|
+
stats.history.append(r)
|
926
|
+
|
927
|
+
|
910
928
|
def stats_history(runner: Runner) -> None:
|
911
929
|
"""Save current stats info to history for charts of report."""
|
912
930
|
while True:
|
913
|
-
|
914
|
-
if not stats.total.use_response_times_cache:
|
931
|
+
if not runner.stats.total.use_response_times_cache:
|
915
932
|
break
|
916
933
|
if runner.state != "stopped":
|
917
|
-
|
918
|
-
|
919
|
-
or 0
|
920
|
-
for percentile in PERCENTILES_TO_CHART
|
921
|
-
}
|
922
|
-
|
923
|
-
r = {
|
924
|
-
**current_response_time_percentiles,
|
925
|
-
"time": datetime.datetime.now(tz=datetime.timezone.utc).strftime("%H:%M:%S"),
|
926
|
-
"current_rps": stats.total.current_rps or 0,
|
927
|
-
"current_fail_per_sec": stats.total.current_fail_per_sec or 0,
|
928
|
-
"total_avg_response_time": stats.total.avg_response_time,
|
929
|
-
"user_count": runner.user_count or 0,
|
930
|
-
}
|
931
|
-
stats.history.append(r)
|
934
|
+
update_stats_history(runner)
|
935
|
+
|
932
936
|
gevent.sleep(HISTORY_STATS_INTERVAL_SEC)
|
933
937
|
|
934
938
|
|
locust/web.py
CHANGED
@@ -146,8 +146,9 @@ class WebUI:
|
|
146
146
|
@app.errorhandler(Exception)
|
147
147
|
def handle_exception(error):
|
148
148
|
error_message = str(error)
|
149
|
-
|
150
|
-
|
149
|
+
error_code = getattr(error, "code", 500)
|
150
|
+
logger.log(logging.INFO if error_code <= 404 else logging.ERROR, error_message)
|
151
|
+
return make_response(error_message, error_code)
|
151
152
|
|
152
153
|
@app.route("/assets/<path:path>")
|
153
154
|
def send_assets(path):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: locust
|
3
|
-
Version: 2.27.1.
|
3
|
+
Version: 2.27.1.dev29
|
4
4
|
Summary: Developer-friendly load testing framework
|
5
5
|
License: MIT
|
6
6
|
Project-URL: Homepage, https://github.com/locustio/locust
|
@@ -32,7 +32,7 @@ Requires-Dist: Werkzeug >=2.0.0
|
|
32
32
|
Requires-Dist: requests >=2.26.0
|
33
33
|
Requires-Dist: msgpack >=1.0.0
|
34
34
|
Requires-Dist: pyzmq >=25.0.0
|
35
|
-
Requires-Dist: geventhttpclient
|
35
|
+
Requires-Dist: geventhttpclient >=2.3.1
|
36
36
|
Requires-Dist: ConfigArgParse >=1.5.5
|
37
37
|
Requires-Dist: psutil >=5.9.1
|
38
38
|
Requires-Dist: Flask-Login >=0.6.3
|
@@ -1,22 +1,22 @@
|
|
1
1
|
locust/__init__.py,sha256=g6oA-Ba_hs3gLWVf5MKJ1mvfltI8MFnDWG8qslqm8yg,1402
|
2
2
|
locust/__main__.py,sha256=vBQ82334kX06ImDbFlPFgiBRiLIinwNk3z8Khs6hd74,31
|
3
|
-
locust/_version.py,sha256=
|
4
|
-
locust/argument_parser.py,sha256=
|
3
|
+
locust/_version.py,sha256=I6BTfLIphBjjt9ydexOJQNz7f8bA7p_9sx4GEtlDCaA,428
|
4
|
+
locust/argument_parser.py,sha256=w4-Ue1XAFPwG3sLyXrpdV9ejKjTUOpcSsPBbCKwRbiQ,28740
|
5
5
|
locust/clients.py,sha256=YKuAyMAbxs8_-w7XJw0hc67KFBNNLxibsw6FwiS01Q8,14781
|
6
6
|
locust/debug.py,sha256=We6Z9W0btkKSc7PxWmrZx-xMynvOOsKhG6jmDgQin0g,5134
|
7
7
|
locust/dispatch.py,sha256=vYh0QEDFgJ3hY0HgSk-EiNO7IP9ffzXF_Et8wB9JvsI,16995
|
8
8
|
locust/env.py,sha256=SLtUQCYaiv_oq_Nz1xaB0OD8RkTdESt2b71vz_qohpo,12452
|
9
9
|
locust/event.py,sha256=xgNKbcejxy1TNUfIdgV75KgD2_BOwQmvjrJ4hWuydRw,7740
|
10
10
|
locust/exception.py,sha256=jGgJ32ubuf4pWdlaVOkbh2Y0LlG0_DHi-lv3ib8ppOE,1791
|
11
|
-
locust/html.py,sha256=
|
11
|
+
locust/html.py,sha256=C-RvShjgRRqzzYGdOGCelobm_SlEGjp8TutvHou1er0,4050
|
12
12
|
locust/input_events.py,sha256=ZIyePyAMuA_YFYWg18g_pE4kwuQV3RbEB250MzXRwjY,3314
|
13
13
|
locust/log.py,sha256=cqLt7nnxnQuM4vWFB5EpJpNUTxGBVEkUJuaJPI1S7_Y,3186
|
14
|
-
locust/main.py,sha256=
|
14
|
+
locust/main.py,sha256=NGjL5QqakU5aeyUzwu2Fh00xVZfC3eoBE3DtfOmRtcM,27854
|
15
15
|
locust/py.typed,sha256=gkWLl8yD4mIZnNYYAIRM8g9VarLvWmTAFeUfEbxJLBw,65
|
16
16
|
locust/runners.py,sha256=Go8b8fpOAfFy6JuNcot7KyguHuExA6eoPHVmcgx3RoI,67813
|
17
17
|
locust/shape.py,sha256=t-lwBS8LOjWcKXNL7j2U3zroIXJ1b0fazUwpRYQOKXw,1973
|
18
|
-
locust/stats.py,sha256
|
19
|
-
locust/web.py,sha256=
|
18
|
+
locust/stats.py,sha256=-kI5fTGgs6w5FSaFYGhBAE2PnnCQWuBqmhYPTGPctTA,45558
|
19
|
+
locust/web.py,sha256=DKYHrH2Aq3TJ-lKSjG15uEQH4MBlU_zqMZPclqoLtuU,27036
|
20
20
|
locust/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
21
|
locust/contrib/fasthttp.py,sha256=vByPepw35DF84qZ2xK89yHgjOA_8btV0wig_rSR6p4g,26757
|
22
22
|
locust/rpc/__init__.py,sha256=nVGoHWFQxZjnhCDWjbgXIbmFbN9sizAjkhvSs9_642c,58
|
@@ -70,9 +70,9 @@ locust/webui/dist/report.html,sha256=sOdZZVgZbqgu86BBCSQf3uQUYXgmgSnXF32JpnyAII8
|
|
70
70
|
locust/webui/dist/assets/favicon.ico,sha256=IUl-rYqfpHdV38e-s0bkmFIeLS-n3Ug0DQxk-h202hI,8348
|
71
71
|
locust/webui/dist/assets/index-941b6e82.js,sha256=G3n5R81Svt0HzbWaV3AV20jLWGLr4X50UZ-Adu2KcxU,1645614
|
72
72
|
locust/webui/dist/assets/logo.png,sha256=EIVPqr6wE_yqguHaqFHIsH0ZACLSrvNWyYO7PbyIj4w,19299
|
73
|
-
locust-2.27.1.
|
74
|
-
locust-2.27.1.
|
75
|
-
locust-2.27.1.
|
76
|
-
locust-2.27.1.
|
77
|
-
locust-2.27.1.
|
78
|
-
locust-2.27.1.
|
73
|
+
locust-2.27.1.dev29.dist-info/LICENSE,sha256=78XGpIn3fHVBfaxlPNUfjVufSN7QsdhpJMRJHv2AFpo,1095
|
74
|
+
locust-2.27.1.dev29.dist-info/METADATA,sha256=IRkXkEESVfmwdyPrWMCNRf9dZhxMr8ai9BsxJ_vbIJ4,7264
|
75
|
+
locust-2.27.1.dev29.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
76
|
+
locust-2.27.1.dev29.dist-info/entry_points.txt,sha256=RAdt8Ku-56m7bFjmdj-MBhbF6h4NX7tVODR9QNnOg0E,44
|
77
|
+
locust-2.27.1.dev29.dist-info/top_level.txt,sha256=XSsjgPA8Ggf9TqKVbkwSqZFuPlZ085X13M9orDycE20,7
|
78
|
+
locust-2.27.1.dev29.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|