fix(dashboard): 修复性能指标 RPM/TPM 显示为0的问题

- 修复 Admin Dashboard Handler 遗漏返回 rpm/tpm 字段
- 将性能统计时间窗口从1分钟改为5分钟平均值,数据更稳定
This commit is contained in:
shaw
2025-12-24 19:58:33 +08:00
parent 870b21916c
commit aaadd6ed04
5 changed files with 17 additions and 12 deletions

View File

@@ -107,6 +107,10 @@ func (h *DashboardHandler) GetStats(c *gin.Context) {
// 系统运行统计
"average_duration_ms": stats.AverageDurationMs,
"uptime": uptime,
// 性能指标
"rpm": stats.Rpm,
"tpm": stats.Tpm,
})
}