locust-cloud 1.5.9__py3-none-any.whl → 1.5.11__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_cloud/__init__.py +1 -1
- locust_cloud/cloud.py +3 -3
- locust_cloud/constants.py +1 -1
- locust_cloud/timescale/exporter.py +11 -2
- locust_cloud/timescale/queries.py +4 -1
- locust_cloud/timescale/query.py +1 -1
- locust_cloud/webui/dist/assets/{index-CgjytB1w.js → index-BrOP_HSY.js} +77 -77
- locust_cloud/webui/dist/index.html +1 -1
- locust_cloud/webui/package.json +1 -1
- locust_cloud/webui/tsconfig.tsbuildinfo +1 -1
- locust_cloud/webui/yarn.lock +4 -4
- {locust_cloud-1.5.9.dist-info → locust_cloud-1.5.11.dist-info}/METADATA +1 -1
- locust_cloud-1.5.11.dist-info/RECORD +23 -0
- locust_cloud-1.5.9.dist-info/RECORD +0 -23
- {locust_cloud-1.5.9.dist-info → locust_cloud-1.5.11.dist-info}/WHEEL +0 -0
- {locust_cloud-1.5.9.dist-info → locust_cloud-1.5.11.dist-info}/entry_points.txt +0 -0
locust_cloud/__init__.py
CHANGED
locust_cloud/cloud.py
CHANGED
@@ -201,10 +201,10 @@ def main() -> None:
|
|
201
201
|
deployed_pods: list[Any] = []
|
202
202
|
worker_count: int = max(options.workers or math.ceil(options.users / USERS_PER_WORKER), 2)
|
203
203
|
os.environ["AWS_DEFAULT_REGION"] = options.region
|
204
|
-
if options.users >
|
205
|
-
logger.error("You asked for more than
|
204
|
+
if options.users > 5000000:
|
205
|
+
logger.error("You asked for more than 5000000 Users, that isn't allowed.")
|
206
206
|
sys.exit(1)
|
207
|
-
if worker_count >
|
207
|
+
if worker_count > 1000:
|
208
208
|
logger.error("You asked for more than 20 workers, that isn't allowed.")
|
209
209
|
sys.exit(1)
|
210
210
|
try:
|
locust_cloud/constants.py
CHANGED
@@ -12,6 +12,7 @@ import locust.env
|
|
12
12
|
import psycopg
|
13
13
|
import psycopg.types.json
|
14
14
|
from locust.exception import CatchResponseError
|
15
|
+
from locust.runners import MasterRunner
|
15
16
|
|
16
17
|
|
17
18
|
def safe_serialize(obj):
|
@@ -185,11 +186,19 @@ class Exporter:
|
|
185
186
|
cmd = sys.argv[1:]
|
186
187
|
with self.pool.connection() as conn:
|
187
188
|
conn.execute(
|
188
|
-
"INSERT INTO testruns (id, num_users, description, arguments) VALUES (%s,%s,%s,%s)",
|
189
|
+
"INSERT INTO testruns (id, num_users, worker_count, username, locustfile, description, arguments) VALUES (%s,%s,%s,%s,%s,%s,%s)",
|
189
190
|
(
|
190
191
|
self._run_id,
|
191
192
|
self.env.runner.target_user_count if self.env.runner else 1,
|
192
|
-
|
193
|
+
len(self.env.runner.clients)
|
194
|
+
if isinstance(
|
195
|
+
self.env.runner,
|
196
|
+
MasterRunner,
|
197
|
+
)
|
198
|
+
else 0,
|
199
|
+
self.env.web_ui.template_args.get("username", "") if self.env.web_ui else "",
|
200
|
+
self.env.parsed_locustfiles[0].split("/")[-1],
|
201
|
+
self.env.parsed_options.description,
|
193
202
|
" ".join(cmd),
|
194
203
|
),
|
195
204
|
)
|
@@ -198,7 +198,10 @@ SELECT
|
|
198
198
|
requests,
|
199
199
|
date_trunc('second', end_time - id) AS "runTime",
|
200
200
|
description,
|
201
|
-
exit_code as "exitCode"
|
201
|
+
exit_code as "exitCode",
|
202
|
+
username,
|
203
|
+
worker_count as "workerCount",
|
204
|
+
locustfile
|
202
205
|
FROM testruns
|
203
206
|
ORDER BY id DESC
|
204
207
|
"""
|
locust_cloud/timescale/query.py
CHANGED
@@ -59,5 +59,5 @@ def register_query(environment, pool):
|
|
59
59
|
logger.warning(f"Received invalid query key: '{query}'")
|
60
60
|
return make_response("Invalid query key", 401)
|
61
61
|
except Exception as e:
|
62
|
-
logger.
|
62
|
+
logger.info(f"Error executing UI query '{query}': {e}", exc_info=True)
|
63
63
|
return make_response("Error executing query", 401)
|