locust 2.37.3.dev1__py3-none-any.whl → 2.37.4.dev1__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/web.py +13 -0
- locust/webui/dist/assets/{index-D2b9JQ_o.js → index-Ufqx__MB.js} +37 -37
- locust/webui/dist/auth.html +1 -1
- locust/webui/dist/index.html +1 -1
- {locust-2.37.3.dev1.dist-info → locust-2.37.4.dev1.dist-info}/METADATA +1 -1
- {locust-2.37.3.dev1.dist-info → locust-2.37.4.dev1.dist-info}/RECORD +10 -10
- {locust-2.37.3.dev1.dist-info → locust-2.37.4.dev1.dist-info}/WHEEL +0 -0
- {locust-2.37.3.dev1.dist-info → locust-2.37.4.dev1.dist-info}/entry_points.txt +0 -0
- {locust-2.37.3.dev1.dist-info → locust-2.37.4.dev1.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.4.dev1'
|
21
|
+
__version_tuple__ = version_tuple = (2, 37, 4, 'dev1')
|
locust/web.py
CHANGED
@@ -33,10 +33,12 @@ from gevent import pywsgi
|
|
33
33
|
|
34
34
|
from . import __version__ as version
|
35
35
|
from . import argument_parser, stats
|
36
|
+
from .contrib import fasthttp
|
36
37
|
from .html import DEFAULT_BUILD_PATH, get_html_report, render_template_from
|
37
38
|
from .log import get_logs, greenlet_exception_logger
|
38
39
|
from .runners import STATE_MISSING, STATE_RUNNING, MasterRunner
|
39
40
|
from .user.inspectuser import get_ratio
|
41
|
+
from .user.users import HttpUser
|
40
42
|
from .util.cache import memoize
|
41
43
|
from .util.date import format_safe_timestamp
|
42
44
|
from .util.timespan import parse_timespan
|
@@ -49,6 +51,7 @@ logger = logging.getLogger(__name__)
|
|
49
51
|
greenlet_exception_handler = greenlet_exception_logger(logger)
|
50
52
|
|
51
53
|
DEFAULT_CACHE_TIME = 2.0
|
54
|
+
HOST_IS_REQUIRED = False
|
52
55
|
|
53
56
|
|
54
57
|
class InputField(TypedDict, total=False):
|
@@ -652,6 +655,7 @@ class WebUI:
|
|
652
655
|
|
653
656
|
def update_template_args(self):
|
654
657
|
override_host_warning = False
|
658
|
+
missing_host_warning = False
|
655
659
|
if self.environment.host:
|
656
660
|
host = self.environment.host
|
657
661
|
elif self.environment.runner.user_classes:
|
@@ -663,8 +667,15 @@ class WebUI:
|
|
663
667
|
# inform that specifying host will override the host for all User classes
|
664
668
|
override_host_warning = True
|
665
669
|
host = None
|
670
|
+
all_http_user_hosts = [
|
671
|
+
user_class.host
|
672
|
+
for user_class in self.environment.runner.user_classes
|
673
|
+
if issubclass(user_class, HttpUser) or issubclass(user_class, fasthttp.FastHttpUser)
|
674
|
+
]
|
675
|
+
missing_host_warning = not all(all_http_user_hosts)
|
666
676
|
else:
|
667
677
|
host = None
|
678
|
+
missing_host_warning = True
|
668
679
|
|
669
680
|
options = self.environment.parsed_options
|
670
681
|
|
@@ -707,6 +718,7 @@ class WebUI:
|
|
707
718
|
"host": host if host else "",
|
708
719
|
"history": request_stats.history if request_stats.num_requests > 0 else [],
|
709
720
|
"override_host_warning": override_host_warning,
|
721
|
+
"missing_host_warning": missing_host_warning,
|
710
722
|
"num_users": options and options.num_users,
|
711
723
|
"spawn_rate": options and options.spawn_rate,
|
712
724
|
"worker_count": worker_count,
|
@@ -727,6 +739,7 @@ class WebUI:
|
|
727
739
|
"users": users,
|
728
740
|
"percentiles_to_chart": stats.PERCENTILES_TO_CHART,
|
729
741
|
"percentiles_to_statistics": stats.PERCENTILES_TO_STATISTICS,
|
742
|
+
"is_host_required": HOST_IS_REQUIRED,
|
730
743
|
"profile": self.environment.profile,
|
731
744
|
}
|
732
745
|
|