feat(dashboard): 添加 RPM/TPM 性能指标
在 Dashboard 中用 RPM/TPM 卡片替换原来的"今日缓存"卡片, 实时显示最近1分钟的请求数和 Token 吞吐量。
This commit is contained in:
@@ -42,6 +42,10 @@ type DashboardStats struct {
|
||||
|
||||
// 系统运行统计
|
||||
AverageDurationMs float64 `json:"average_duration_ms"` // 平均响应时间
|
||||
|
||||
// 性能指标
|
||||
Rpm int64 `json:"rpm"` // 最近1分钟的请求数
|
||||
Tpm int64 `json:"tpm"` // 最近1分钟的Token数
|
||||
}
|
||||
|
||||
// TrendDataPoint represents a single point in trend data
|
||||
@@ -115,6 +119,10 @@ type UserDashboardStats struct {
|
||||
|
||||
// 性能统计
|
||||
AverageDurationMs float64 `json:"average_duration_ms"`
|
||||
|
||||
// 性能指标
|
||||
Rpm int64 `json:"rpm"` // 最近1分钟的请求数
|
||||
Tpm int64 `json:"tpm"` // 最近1分钟的Token数
|
||||
}
|
||||
|
||||
// UsageLogFilters represents filters for usage log queries
|
||||
|
||||
Reference in New Issue
Block a user