locust 2.31.7.dev23__py3-none-any.whl → 2.31.8__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 CHANGED
@@ -14,7 +14,7 @@ __version_tuple__: VERSION_TUPLE
14
14
  version_tuple: VERSION_TUPLE
15
15
 
16
16
 
17
- __version__ = "2.31.7.dev23"
17
+ __version__ = "2.31.8"
18
18
  version = __version__
19
- __version_tuple__ = (2, 31, 7, "dev23")
19
+ __version_tuple__ = (2, 31, 8)
20
20
  version_tuple = __version_tuple__
locust/main.py CHANGED
@@ -5,6 +5,7 @@ import locust
5
5
  import atexit
6
6
  import errno
7
7
  import gc
8
+ import importlib.metadata
8
9
  import inspect
9
10
  import json
10
11
  import logging
@@ -44,7 +45,10 @@ except ModuleNotFoundError as e:
44
45
  raise
45
46
  try:
46
47
  import locust_cloud # pyright: ignore[reportMissingImports]
48
+
49
+ locust_cloud_version = f" (locust-cloud {importlib.metadata.version('locust-cloud')})"
47
50
  except ModuleNotFoundError as e:
51
+ locust_cloud_version = ""
48
52
  if e.msg != "No module named 'locust_cloud'":
49
53
  raise
50
54
 
@@ -200,7 +204,8 @@ def main():
200
204
 
201
205
  children = []
202
206
  logger = logging.getLogger(__name__)
203
- logger.info(f"Starting Locust {version}")
207
+
208
+ logger.info(f"Starting Locust {version}{locust_cloud_version}")
204
209
 
205
210
  if options.processes:
206
211
  if os.name == "nt":
locust/runners.py CHANGED
@@ -1019,7 +1019,7 @@ class MasterRunner(DistributedRunner):
1019
1019
  # TODO: Test this situation
1020
1020
  self.start(self.target_user_count, self.spawn_rate)
1021
1021
  logger.info(
1022
- f"Worker {client_id} (index {self.get_worker_index(client_id)}) reported as ready. {len(self.clients.ready + self.clients.running + self.clients.spawning)} workers connected."
1022
+ f"{client_id} (index {self.get_worker_index(client_id)}) reported as ready. {len(self.clients.ready + self.clients.running + self.clients.spawning)} workers connected."
1023
1023
  )
1024
1024
  if self.rebalancing_enabled() and self.state == STATE_RUNNING and self.spawning_completed:
1025
1025
  self.start(self.target_user_count, self.spawn_rate)
@@ -1079,9 +1079,7 @@ class MasterRunner(DistributedRunner):
1079
1079
  if not self._users_dispatcher.dispatch_in_progress and self.state == STATE_RUNNING:
1080
1080
  # TODO: Test this situation
1081
1081
  self.start(self.target_user_count, self.spawn_rate)
1082
- logger.info(
1083
- f"Worker {msg.node_id} (index {self.get_worker_index(client_id)}) reported that it has stopped, removing from running workers"
1084
- )
1082
+ logger.info(f"{msg.node_id} (index {self.get_worker_index(client_id)}) reported that it has stopped")
1085
1083
  elif msg.type == "heartbeat":
1086
1084
  if msg.node_id in self.clients:
1087
1085
  c = self.clients[msg.node_id]
locust/web.py CHANGED
@@ -629,7 +629,7 @@ class WebUI:
629
629
  else None
630
630
  )
631
631
 
632
- self.template_args = {
632
+ new_template_args = {
633
633
  "locustfile": self.environment.locustfile,
634
634
  "state": self.environment.runner.state,
635
635
  "is_distributed": is_distributed,
@@ -658,6 +658,8 @@ class WebUI:
658
658
  "percentiles_to_statistics": stats_module.PERCENTILES_TO_STATISTICS,
659
659
  }
660
660
 
661
+ self.template_args = {**self.template_args, **new_template_args}
662
+
661
663
  def _update_shape_class(self, shape_class_name):
662
664
  if shape_class_name:
663
665
  shape_class = self.environment.available_shape_classes[shape_class_name]