feat(scripts): 添加针对code_js1接口的压测脚本和结果

添加压测脚本run_stress_code_js1.sh和stress_code_js1.py,用于对code_js1接口进行并发压力测试
生成压测结果JSON文件,包含请求统计、延迟和吞吐量等指标
This commit is contained in:
2025-10-10 23:23:02 +08:00
parent a4d20bc788
commit a1b21e87b3
5 changed files with 338 additions and 0 deletions

View File

@ -0,0 +1,29 @@
{
"url": "http://127.0.0.1:9898/api/dynamic/code_js1",
"method": "POST",
"total": 3000,
"concurrency": 150,
"timeout_sec": 8.0,
"ok": 3000,
"errors": 0,
"has_data": 3000,
"duration_ms": 13766.637417022139,
"throughput_rps": 217.91813854925584,
"status_counts": {
"200": 3000
},
"latency_ms": {
"min": 550.376542028971,
"avg": 686.4437982002273,
"max": 980.3312500007451,
"p50": 671.9021250028163,
"p90": 800.2895419485867,
"p95": 885.534834000282,
"p99": 946.9203340122476
},
"resp_size_bytes": {
"avg": 556,
"min": 556,
"max": 556
}
}

View File

@ -0,0 +1,29 @@
{
"url": "http://127.0.0.1:9898/api/dynamic/code_js1",
"method": "POST",
"total": 100,
"concurrency": 20,
"timeout_sec": 5.0,
"ok": 100,
"errors": 0,
"has_data": 100,
"duration_ms": 486.8026250042021,
"throughput_rps": 205.42206402263503,
"status_counts": {
"200": 100
},
"latency_ms": {
"min": 56.31004192400724,
"avg": 94.25131994648837,
"max": 153.34666694980115,
"p50": 79.22116597183049,
"p90": 147.41216704715043,
"p95": 151.8984999274835,
"p99": 152.9659579973668
},
"resp_size_bytes": {
"avg": 556,
"min": 556,
"max": 556
}
}

View File

@ -0,0 +1,29 @@
{
"url": "http://127.0.0.1:9898/api/dynamic/code_js1",
"method": "POST",
"total": 50,
"concurrency": 10,
"timeout_sec": 8.0,
"ok": 50,
"errors": 0,
"has_data": 50,
"duration_ms": 266.0578330978751,
"throughput_rps": 187.9290657140939,
"status_counts": {
"200": 50
},
"latency_ms": {
"min": 25.911415927112103,
"avg": 50.4597524413839,
"max": 117.64616600703448,
"p50": 37.48199995607138,
"p90": 103.3676250372082,
"p95": 107.0811670506373,
"p99": 108.35866699926555
},
"resp_size_bytes": {
"avg": 556,
"min": 556,
"max": 556
}
}