Add benchmark reports and test results with metrics and visualizations

This commit is contained in:
Mingor committed 2025-04-22 18:16:20 +08:00
1 parent a6f82d5a0b
commit 1838c1d559
23 files changed
+1242 -187

No files matched your search

@@ -0,0 +1,55 @@
[2025-04-22 15:17:42.168] [信息] 日志文件已设置: reports/report_2025-04-22_15-17-42/api_logs.txt
[2025-04-22 15:17:42.168] [信息] API请求响应日志将记录到: reports/report_2025-04-22_15-17-42/api_logs.txt
[2025-04-22 15:17:42.168] [信息] 创建报告输出目录: reports/report_2025-04-22_15-17-42
[2025-04-22 15:17:42.168] [调试] 共有 3 条测试结果记录
[2025-04-22 15:17:42.168] [信息] 计算性能指标...
[2025-04-22 15:17:42.168] [调试] 计算指标 - 总请求数: 3
[2025-04-22 15:17:42.169] [调试] 计算指标 - 成功请求: 3, 失败请求: 0
[2025-04-22 15:17:42.169] [调试] 计算指标 - 超时比率: 0.00%
[2025-04-22 15:17:42.169] [调试] 计算指标 - 响应时间(ms) - 平均: 22476.33, P90: 24723.00, P95: 24723.00, P99: 24723.00, 最小: 17983.00, 最大: 24791.00
[2025-04-22 15:17:42.169] [调试] 计算指标 - TTFT(ms) - 最小: 9267.00, 最大: 11273.00, P90: 11088.00, P95: 11088.00, P99: 11088.00
[2025-04-22 15:17:42.169] [调试] 计算指标 - 平均QPS: 0.06 (总持续时间: 50.92秒)
[2025-04-22 15:17:42.169] [调试] 计算各并发步骤的QPS...
[2025-04-22 15:17:42.169] [调试] 并发步骤 1: 持续时间过短
[2025-04-22 15:17:42.169] [调试] 并发步骤 2: QPS = 205128.21 (成功请求: 2, 持续时间: 0.00秒)
[2025-04-22 15:17:42.169] [调试] 更新最大QPS: 205128.21 (并发步骤: 2)
[2025-04-22 15:17:42.169] [调试] 更新最大有效并发用户数: 2
[2025-04-22 15:17:42.169] [调试] 计算指标 - 平均Token生成速率: 19.25 tokens/s (总Token: 980)
[2025-04-22 15:17:42.169] [调试] 计算各并发步骤的Token生成速率...
[2025-04-22 15:17:42.169] [调试] 并发步骤 2: Token生成速率 = 68307692.31 tokens/s (总Token: 666, 持续时间: 0.00秒)
[2025-04-22 15:17:42.169] [调试] 更新最大Token生成速率: 68307692.31 tokens/s (并发步骤: 2)
[2025-04-22 15:17:42.169] [信息] 性能指标摘要:
[2025-04-22 15:17:42.169] [信息] 总请求数: 3 (成功: 3, 失败: 0)
[2025-04-22 15:17:42.169] [信息] 超时比率: 0.00%
[2025-04-22 15:17:42.169] [信息] 平均响应时间: 22.476s
[2025-04-22 15:17:42.169] [信息] P90响应时间: 24.723s
[2025-04-22 15:17:42.169] [信息] P95响应时间: 24.723s
[2025-04-22 15:17:42.169] [信息] P99响应时间: 24.723s
[2025-04-22 15:17:42.169] [信息] 平均QPS: 0.06
[2025-04-22 15:17:42.169] [信息] 最大QPS: 205128.21
[2025-04-22 15:17:42.169] [信息] 平均Token生成速率: 19.25 tokens/s
[2025-04-22 15:17:42.169] [信息] 最大Token生成速率: 68307692.31 tokens/s
[2025-04-22 15:17:42.169] [信息] 最大有效并发用户数: 2
[2025-04-22 15:17:42.169] [信息] 最小首个令牌生成时间: 9.267s
[2025-04-22 15:17:42.169] [信息] 最大首个令牌生成时间: 11.273s
[2025-04-22 15:17:42.169] [信息] P90首个令牌生成时间: 11.088s
[2025-04-22 15:17:42.169] [信息] P95首个令牌生成时间: 11.088s
[2025-04-22 15:17:42.169] [信息] P99首个令牌生成时间: 11.088s
[2025-04-22 15:17:42.169] [信息] 生成HTML报告...
[2025-04-22 15:17:42.169] [调试] 创建HTML报告页面...
[2025-04-22 15:17:42.169] [调试] 添加概述图表...
[2025-04-22 15:17:42.169] [调试] 添加响应时间分布图...
[2025-04-22 15:17:42.170] [调试] 添加QPS随时间变化图...
[2025-04-22 15:17:42.170] [调试] 添加Token生成速率随时间变化图...
[2025-04-22 15:17:42.170] [调试] 添加并发与响应时间关系图...
[2025-04-22 15:17:42.170] [调试] 添加TTFT随时间变化图...
[2025-04-22 15:17:42.170] [调试] 保存HTML报告: reports/report_2025-04-22_15-17-42/report.html
[2025-04-22 15:17:42.175] [信息] 生成CSV数据...
[2025-04-22 15:17:42.175] [调试] 创建CSV文件: reports/report_2025-04-22_15-17-42/results.csv
[2025-04-22 15:17:42.176] [调试] 写入CSV头...
[2025-04-22 15:17:42.176] [调试] 写入CSV数据,共3条记录...
[2025-04-22 15:17:42.176] [调试] CSV数据写入完成
[2025-04-22 15:17:42.176] [信息] 报告生成完成
[2025-04-22 15:17:42.176] [信息] 基准测试完成!报告已生成: reports/report_2025-04-22_15-17-42
[2025-04-22 15:17:42.176] [信息] HTML报告: reports/report_2025-04-22_15-17-42/report.html
[2025-04-22 15:17:42.176] [信息] CSV数据: reports/report_2025-04-22_15-17-42/results.csv
@@ -0,0 +1,121 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>LLM API 基准测试报告</title>
<script src="https://go-echarts.github.io/go-echarts-assets/assets/echarts.min.js"></script>
</head>
<body>
<style> .container {display: flex;justify-content: center;align-items: center;} .item {margin: auto;} </style>
<div class="container">
<div class="item" id="csYaKBGQJwwL" style="width:900px;height:500px;"></div>
</div>
<script type="text/javascript">
"use strict";
let goecharts_csYaKBGQJwwL = echarts.init(document.getElementById('csYaKBGQJwwL'), "white");
let option_csYaKBGQJwwL = {"animation":true,"color":["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],"legend":{"show":true,"type":""},"series":[{"name":"指标","type":"bar","smooth":false,"connectNulls":false,"showSymbol":false,"waveAnimation":false,"renderLabelForZeroData":false,"selectedMode":false,"animation":false,"data":[{"value":3},{"value":3},{"value":0},{"value":22476},{"value":24723},{"value":24723},{"value":24723},{"value":9267},{"value":11273},{"value":11088},{"value":11088},{"value":11088},{"value":0.058917026111260054},{"value":205128.20512820513}]}],"title":{"text":"性能概览"},"tooltip":{"show":false},"xAxis":[{"data":["总请求数","成功请求数","失败请求数","平均响应时间(ms)","P90响应时间(ms)","P95响应时间(ms)","P99响应时间(ms)","最小TTFT(ms)","最大TTFT(ms)","P90 TTFT(ms)","P95 TTFT(ms)","P99 TTFT(ms)","平均QPS","最大QPS"]}],"yAxis":[{}]}
;
let action_csYaKBGQJwwL = {"areas":{},"type":""}
;
goecharts_csYaKBGQJwwL.setOption(option_csYaKBGQJwwL);
goecharts_csYaKBGQJwwL.dispatchAction(action_csYaKBGQJwwL);
</script>
<div class="container">
<div class="item" id="ccezcGJddHPN" style="width:900px;height:500px;"></div>
</div>
<script type="text/javascript">
"use strict";
let goecharts_ccezcGJddHPN = echarts.init(document.getElementById('ccezcGJddHPN'), "white");
let option_ccezcGJddHPN = {"animation":true,"color":["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],"legend":{"show":true,"type":""},"series":[{"name":"请求数","type":"bar","smooth":false,"connectNulls":false,"showSymbol":false,"waveAnimation":false,"renderLabelForZeroData":false,"selectedMode":false,"animation":false,"data":[{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":3}]}],"title":{"text":"响应时间分布"},"tooltip":{"show":false},"xAxis":[{"data":["≤100ms","100-200ms","200-500ms","500-1000ms","1000-2000ms","2000-5000ms","5000-10000ms",">10000ms"]}],"yAxis":[{}]}
;
let action_ccezcGJddHPN = {"areas":{},"type":""}
;
goecharts_ccezcGJddHPN.setOption(option_ccezcGJddHPN);
goecharts_ccezcGJddHPN.dispatchAction(action_ccezcGJddHPN);
</script>
<div class="container">
<div class="item" id="KJeZkMONuYVK" style="width:900px;height:500px;"></div>
</div>
<script type="text/javascript">
"use strict";
let goecharts_KJeZkMONuYVK = echarts.init(document.getElementById('KJeZkMONuYVK'), "white");
let option_KJeZkMONuYVK = {"animation":true,"color":["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],"legend":{"show":true,"type":""},"series":[{"name":"并发 1","type":"line","smooth":false,"connectNulls":false,"showSymbol":false,"waveAnimation":false,"renderLabelForZeroData":false,"selectedMode":false,"animation":true,"data":[{"value":0.2,"XAxisIndex":0,"YAxisIndex":0}]},{"name":"并发 2","type":"line","smooth":false,"connectNulls":false,"showSymbol":false,"waveAnimation":false,"renderLabelForZeroData":false,"selectedMode":false,"animation":true,"data":[{"value":0.4,"XAxisIndex":0,"YAxisIndex":0}]}],"title":{"text":"QPS随时间变化"},"tooltip":{"show":false},"xAxis":[{"data":["15:17:17"]}],"yAxis":[{}]}
;
let action_KJeZkMONuYVK = {"areas":{},"type":""}
;
goecharts_KJeZkMONuYVK.setOption(option_KJeZkMONuYVK);
goecharts_KJeZkMONuYVK.dispatchAction(action_KJeZkMONuYVK);
</script>
<div class="container">
<div class="item" id="iptMRELGIKHr" style="width:900px;height:500px;"></div>
</div>
<script type="text/javascript">
"use strict";
let goecharts_iptMRELGIKHr = echarts.init(document.getElementById('iptMRELGIKHr'), "white");
let option_iptMRELGIKHr = {"animation":true,"color":["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],"legend":{"show":true,"type":""},"series":[{"name":"并发 1","type":"line","smooth":false,"connectNulls":false,"showSymbol":false,"waveAnimation":false,"renderLabelForZeroData":false,"selectedMode":false,"animation":true,"data":[{"value":62.8,"XAxisIndex":0,"YAxisIndex":0}]},{"name":"并发 2","type":"line","smooth":false,"connectNulls":false,"showSymbol":false,"waveAnimation":false,"renderLabelForZeroData":false,"selectedMode":false,"animation":true,"data":[{"value":133.2,"XAxisIndex":0,"YAxisIndex":0}]}],"title":{"text":"Token生成速率随时间变化"},"tooltip":{"show":false},"xAxis":[{"data":["15:17:17"]}],"yAxis":[{}]}
;
let action_iptMRELGIKHr = {"areas":{},"type":""}
;
goecharts_iptMRELGIKHr.setOption(option_iptMRELGIKHr);
goecharts_iptMRELGIKHr.dispatchAction(action_iptMRELGIKHr);
</script>
<div class="container">
<div class="item" id="KIZPieHjJeve" style="width:900px;height:500px;"></div>
</div>
<script type="text/javascript">
"use strict";
let goecharts_KIZPieHjJeve = echarts.init(document.getElementById('KIZPieHjJeve'), "white");
let option_KIZPieHjJeve = {"animation":true,"color":["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],"legend":{"show":true,"type":""},"series":[{"name":"平均响应时间 (ms)","type":"line","smooth":false,"connectNulls":false,"showSymbol":false,"waveAnimation":false,"renderLabelForZeroData":false,"selectedMode":false,"animation":true,"data":[{"value":24791,"XAxisIndex":0,"YAxisIndex":0},{"value":21319,"XAxisIndex":0,"YAxisIndex":0}]},{"name":"P90响应时间 (ms)","type":"line","smooth":false,"connectNulls":false,"showSymbol":false,"waveAnimation":false,"renderLabelForZeroData":false,"selectedMode":false,"animation":true,"data":[{"value":24791,"XAxisIndex":0,"YAxisIndex":0},{"value":21319,"XAxisIndex":0,"YAxisIndex":0}]},{"name":"P95响应时间 (ms)","type":"line","smooth":false,"connectNulls":false,"showSymbol":false,"waveAnimation":false,"renderLabelForZeroData":false,"selectedMode":false,"animation":true,"data":[{"value":24791,"XAxisIndex":0,"YAxisIndex":0},{"value":21319,"XAxisIndex":0,"YAxisIndex":0}]}],"title":{"text":"并发与响应时间关系"},"tooltip":{"show":false},"xAxis":[{"data":["1","2"]}],"yAxis":[{}]}
;
let action_KIZPieHjJeve = {"areas":{},"type":""}
;
goecharts_KIZPieHjJeve.setOption(option_KIZPieHjJeve);
goecharts_KIZPieHjJeve.dispatchAction(action_KIZPieHjJeve);
</script>
<div class="container">
<div class="item" id="YrBZZZMMvKDw" style="width:900px;height:500px;"></div>
</div>
<script type="text/javascript">
"use strict";
let goecharts_YrBZZZMMvKDw = echarts.init(document.getElementById('YrBZZZMMvKDw'), "white");
let option_YrBZZZMMvKDw = {"animation":true,"color":["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],"legend":{"show":true,"type":""},"series":[{"name":"并发 1","type":"line","smooth":false,"connectNulls":false,"showSymbol":false,"waveAnimation":false,"renderLabelForZeroData":false,"selectedMode":false,"animation":true,"data":[{"value":11273,"XAxisIndex":0,"YAxisIndex":0}]},{"name":"并发 2","type":"line","smooth":false,"connectNulls":false,"showSymbol":false,"waveAnimation":false,"renderLabelForZeroData":false,"selectedMode":false,"animation":true,"data":[{"value":10085,"XAxisIndex":0,"YAxisIndex":0}]}],"title":{"text":"TTFT随时间变化"},"tooltip":{"show":false},"xAxis":[{"data":["15:17:17"]}],"yAxis":[{}]}
;
let action_YrBZZZMMvKDw = {"areas":{},"type":""}
;
goecharts_YrBZZZMMvKDw.setOption(option_YrBZZZMMvKDw);
goecharts_YrBZZZMMvKDw.dispatchAction(action_YrBZZZMMvKDw);
</script>
</body>
</html>
@@ -0,0 +1,4 @@
Timestamp,PromptType,PromptTokens,CompletionTokens,ResponseTime,Concurrency,FirstTokenTime,Error
2025-04-22T15:16:51+08:00,short,50,314,24791,1,11273,
2025-04-22T15:17:17+08:00,short,49,216,17983,2,9267,
2025-04-22T15:17:17+08:00,short,47,450,24655,2,10903,
1 Timestamp PromptType PromptTokens CompletionTokens ResponseTime Concurrency FirstTokenTime Error
2 2025-04-22T15:16:51+08:00 short 50 314 24791 1 11273
3 2025-04-22T15:17:17+08:00 short 49 216 17983 2 9267
4 2025-04-22T15:17:17+08:00 short 47 450 24655 2 10903