v2.3.0 多并发测试 + 多测试结果对比

- 并发数配置:默认单流(1),预设2/4并发档,支持丝滑添加任意自定义并发数(≥1),
  多档勾选时同一测试分别跑各并发档并并排对比
- 并发执行:每采样同时发起N个并行流(ThreadPoolExecutor),整批吞吐聚合
  (多流prompt/output之和/批首字/批耗时),并记录每流明细streams;
  并发=1 与旧版单流行为一致;每流独立随机前缀避免共享缓存
- 汇总:新增 by_concurrency(按并发分组,含单流均解码) + by_length_concurrency(长度x并发网格) + concurrency_levels
- 详情页:新增「按并发数汇总」表 + 并发对比折线图(X=并发数,预填充左虚线/解码右实线, /concurrency-chart)
- 多测试对比:历史表格勾选(可全选)多个测试 -> /api/compare 返回对比表+柱状图CSV+并发折线图CSV,
  前端弹窗展示指标对比表 + 柱状图(预填充空心/解码实心) + 解码随并发折线图,画图CSV可复制/PNG可下载
- 通用图表代理 POST /api/chart(转发 data-chart-tool 请求体返回 PNG)
- 历史列表增加「并发」列与勾选列;Excel 导出增加并发数列表/按并发分组/采样并发列
- 文档:README/API.md 同步更新
This commit is contained in:
2026-09-01 19:33:41 +08:00
parent 2d889c80e0
commit 35ac2a8e40
8 changed files with 797 additions and 77 deletions
+7 -1
View File
@@ -119,6 +119,8 @@ body {
.btn.danger:disabled { opacity: .4; cursor: not-allowed; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.block { width: 100%; }
.btn.link { background: none; border: none; padding: 0; color: var(--accent); font-size: 12.5px; text-decoration: underline; cursor: pointer; }
.btn.link:hover { color: #fff; }
.btn-group { display: flex; gap: 8px; margin-top: 6px; }
.btn-group .btn { flex: 1; }
@@ -160,6 +162,8 @@ table.history { width: 100%; border-collapse: collapse; font-size: 13px; }
.history th { color: var(--muted); font-weight: 600; font-size: 12px; }
.history tbody tr:hover { background: var(--panel2); }
.history td.num { font-family: var(--mono); }
.history .chk-col { width: 34px; text-align: center; }
.history .chk-col input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); }
.status-pill { padding: 2px 10px; border-radius: 12px; font-size: 11px; }
.status-pill.running { background: rgba(79,140,255,.15); color: var(--accent); }
.status-pill.done { background: rgba(34,197,139,.15); color: var(--accent2); }
@@ -181,7 +185,7 @@ table.history { width: 100%; border-collapse: collapse; font-size: 13px; }
padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.modal-head h2 { font-size: 16px; }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-body { padding: 16px 18px; overflow-y: auto; overflow-x: auto; }
.modal-body h3 { font-size: 14px; margin: 16px 0 8px; color: var(--muted); }
.modal-body h3:first-child { margin-top: 0; }
.detail-name {
@@ -199,6 +203,8 @@ table.mini { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mini th { color: var(--muted); font-size: 11px; }
.mini td.num { font-family: var(--mono); }
.mini tr.err td { color: var(--danger); }
.mini.compare { min-width: 860px; }
.mini.compare th, .mini.compare td { white-space: nowrap; }
.detail-log { background: #0a0e17; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font: 12px/1.7 var(--mono); max-height: 240px; overflow-y: auto; }
.detail-log .ln { white-space: pre-wrap; }