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:
+28
-3
@@ -85,9 +85,18 @@
|
||||
<input id="gen-max-tokens" type="number" min="1" step="1" value="128">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>每个长度采样次数</label>
|
||||
<label>每个长度×并发采样次数</label>
|
||||
<input id="gen-samples" type="number" min="1" max="50" value="2">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>并发数(同时请求流数,默认单流)</label>
|
||||
<div class="chips" id="gen-concurrency"></div>
|
||||
<div class="row" style="margin-top:6px">
|
||||
<input id="gen-conc-add" type="number" min="1" max="64" placeholder="自定义并发数(≥1)">
|
||||
<button class="btn small" id="btn-conc-add">+ 添加</button>
|
||||
</div>
|
||||
<div class="hint">选中多个并发数时,同一测试会分别跑各并发档并放在一起对比</div>
|
||||
</div>
|
||||
<div class="field switch-field">
|
||||
<label>测试前预热<span class="hint-inline">空转不计速度,避免冷启动偏差</span></label>
|
||||
<label class="switch">
|
||||
@@ -135,12 +144,17 @@
|
||||
<div class="card">
|
||||
<div class="card-head">
|
||||
<h2>🗂 测试历史</h2>
|
||||
<button class="btn small" id="btn-refresh-history">刷新</button>
|
||||
<div class="log-actions">
|
||||
<span class="hint" id="hist-selected"></span>
|
||||
<button class="btn small primary" id="btn-compare">⚖️ 对比所选</button>
|
||||
<button class="btn small" id="btn-refresh-history">刷新</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-wrap">
|
||||
<table class="history" id="history">
|
||||
<thead><tr>
|
||||
<th>#</th><th>时间</th><th>名称</th><th>提供商</th><th>模型</th><th>采样</th>
|
||||
<th class="chk-col"><input type="checkbox" id="hist-check-all" title="全选"></th>
|
||||
<th>#</th><th>时间</th><th>名称</th><th>提供商</th><th>模型</th><th>并发</th><th>采样</th>
|
||||
<th>首字 ms</th><th>预填充 tok/s</th><th>解码 tok/s</th><th>状态</th><th>操作</th>
|
||||
</tr></thead>
|
||||
<tbody></tbody>
|
||||
@@ -165,6 +179,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 多测试对比弹窗 -->
|
||||
<div class="modal-mask" id="cmp-mask" hidden>
|
||||
<div class="modal">
|
||||
<div class="modal-head">
|
||||
<h2>⚖️ 多测试结果对比</h2>
|
||||
<button class="btn small" id="cmp-close">✕</button>
|
||||
</div>
|
||||
<div class="modal-body" id="cmp-body"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/js/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user