Implement load test script with rate configuration and multipart event simulation.

- Update `scripts/agent/load-test.mjs` to support `--rate` arg.
- Add multipart video event simulation (Post + Mirror).
- Generate performance report with bottleneck analysis.
- Include `artifacts/load-report.json`.

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-05 19:38:01 +00:00
1 parent b095441e11
commit 8f83cff04e
2 files changed
+117 -70

No files matched your search

+74 -52
View File
@@ -1,77 +1,99 @@
{
"meta": {
"clients": 1000,
"duration": 60,
"targetRatePerClient": 0.5
"clients": 50,
"duration": 10,
"targetTotalRate": 50,
"ratePerClient": 1
},
"results": {
"totalSent": 9880,
"totalReceivedByObserver": 9212,
"totalSent": 545,
"totalReceivedByObserver": 554,
"totalErrors": 0,
"errorRate": 0,
"avgLatencyMs": 633.5714285714286,
"maxLatencyMs": 4352,
"avgSignTimeMs": 5.312883614738433
"avgLatencyMs": 5.888888888888889,
"maxLatencyMs": 8,
"avgSignTimeMs": 5.534525739479302,
"hot_functions": [
{
"name": "Event Signing (Client)",
"avgTimeMs": 5.534525739479302,
"calls": 545
}
]
},
"bottlenecks": [
"High Average Latency (>500ms)",
"Cryptographic Bottleneck (Avg Sign Time 5.31ms > 5ms)"
"Cryptographic Bottleneck (Avg Sign Time 5.53ms > 5ms)"
],
"metrics": {
"timestamps": [
"2026-02-02T19:20:53.413Z",
"2026-02-02T19:21:05.252Z",
"2026-02-02T19:21:09.391Z",
"2026-02-02T19:21:17.727Z",
"2026-02-02T19:21:25.657Z",
"2026-02-02T19:21:37.832Z",
"2026-02-02T19:21:46.152Z"
"2026-02-05T19:34:52.639Z",
"2026-02-05T19:34:53.638Z",
"2026-02-05T19:34:54.641Z",
"2026-02-05T19:34:55.649Z",
"2026-02-05T19:34:56.649Z",
"2026-02-05T19:34:57.649Z",
"2026-02-05T19:34:58.672Z",
"2026-02-05T19:34:59.671Z",
"2026-02-05T19:35:00.672Z"
],
"cpu": [
1.805,
1131.911,
420.9089,
851.5216,
798.2084,
1222.0326,
835.8484
47.1817,
40.502,
37.7894,
36.4607,
36.4638,
36.3083,
41.62,
35.6474,
35.4054
],
"memory": [
17.17798614501953,
27.51868438720703,
19.160232543945312,
23.5911865234375,
19.544578552246094,
33.026039123535156,
20.853515625
12.619827270507812,
12.327117919921875,
16.86083221435547,
13.562667846679688,
16.10260009765625,
11.007034301757812,
14.259078979492188,
14.051017761230469,
15.620246887207031
],
"latency": [
14,
4352,
13,
12,
15,
15,
14
8,
6,
6,
5,
6,
6,
6,
5,
5
],
"throughput": [
1,
1119,
1257,
1356,
1330,
1448,
1345
60,
59,
64,
63,
62,
62,
63,
60,
61
],
"avgSignTime": [
0,
6.01051988318584,
5.731465363770286,
5.82640474538752,
5.684893507148126,
8.042285998617778,
5.894615805059483
6.518746254237273,
5.50673901724142,
5.487499650793643,
5.261303790322589,
5.267506754098338,
5.199484229508195,
6.068795209677216,
5.2998529661016915,
5.2008037833333525
]
},
"remediation": [
"Client-side event signing is slow. Review cryptographic library (nostr-tools) usage or client hardware capabilities."
],
"requiresSecurityReview": true
}