locust 2.37.2.dev4__py3-none-any.whl → 2.37.2.dev7__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 +11 -0
- locust/webui/dist/assets/{index-OsbNSvrF.js → index-D2b9JQ_o.js} +62 -62
- locust/webui/dist/auth.html +1 -1
- locust/webui/dist/index.html +1 -1
- {locust-2.37.2.dev4.dist-info → locust-2.37.2.dev7.dist-info}/METADATA +1 -1
- {locust-2.37.2.dev4.dist-info → locust-2.37.2.dev7.dist-info}/RECORD +10 -10
- {locust-2.37.2.dev4.dist-info → locust-2.37.2.dev7.dist-info}/WHEEL +0 -0
- {locust-2.37.2.dev4.dist-info → locust-2.37.2.dev7.dist-info}/entry_points.txt +0 -0
- {locust-2.37.2.dev4.dist-info → locust-2.37.2.dev7.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.2.
|
21
|
-
__version_tuple__ = version_tuple = (2, 37, 2, '
|
20
|
+
__version__ = version = '2.37.2.dev7'
|
21
|
+
__version_tuple__ = version_tuple = (2, 37, 2, 'dev7')
|
locust/web.py
CHANGED
@@ -494,6 +494,7 @@ class WebUI:
|
|
494
494
|
)
|
495
495
|
|
496
496
|
report["workers"] = workers
|
497
|
+
report["worker_count"] = environment.runner.worker_count
|
497
498
|
|
498
499
|
report["state"] = environment.runner.state
|
499
500
|
report["user_count"] = environment.runner.user_count
|
@@ -563,6 +564,7 @@ class WebUI:
|
|
563
564
|
)
|
564
565
|
|
565
566
|
@app_blueprint.route("/user", methods=["POST"])
|
567
|
+
@self.auth_required_if_enabled
|
566
568
|
def update_user():
|
567
569
|
assert request.method == "POST"
|
568
570
|
|
@@ -571,6 +573,15 @@ class WebUI:
|
|
571
573
|
|
572
574
|
return {}, 201
|
573
575
|
|
576
|
+
@app_blueprint.route("/worker-count")
|
577
|
+
@self.auth_required_if_enabled
|
578
|
+
def get_worker_count():
|
579
|
+
return {
|
580
|
+
"worker_count": self.environment.runner.worker_count
|
581
|
+
if isinstance(self.environment.runner, MasterRunner)
|
582
|
+
else 0
|
583
|
+
}
|
584
|
+
|
574
585
|
app.register_blueprint(app_blueprint)
|
575
586
|
|
576
587
|
@property
|