feat(performance): update performance metrics handling and UI components

This commit is contained in:
CaIon
2026-05-12 16:04:15 +08:00
parent ba474393fb
commit 19fc384e67
37 changed files with 936 additions and 443 deletions
+1 -1
View File
@@ -187,7 +187,7 @@ func QuerySummaryAll(hours int) (SummaryAllResult, error) {
})
}
sort.Slice(models, func(i, j int) bool {
return models[i].ModelName < models[j].ModelName
return models[i].RequestCount > models[j].RequestCount
})
return SummaryAllResult{Models: models}, nil
+1 -1
View File
@@ -52,7 +52,7 @@ type ModelSummary struct {
AvgLatencyMs int64 `json:"avg_latency_ms"`
SuccessRate float64 `json:"success_rate"`
AvgTps float64 `json:"avg_tps"`
RequestCount int64 `json:"request_count"`
RequestCount int64 `json:"-"`
}
type SummaryAllResult struct {