chore: add goroutine num display

This commit is contained in:
engigu
2025-12-27 13:54:20 +08:00
parent e22d285add
commit ec882de420
3 changed files with 7 additions and 0 deletions
@@ -2,6 +2,7 @@ package controllers
import (
"path/filepath"
"runtime"
"strconv"
"baihu/internal/constant"
@@ -184,6 +185,7 @@ func (sc *SettingsController) GetAbout(c *gin.Context) {
"version": constant.Version,
"build_time": constant.BuildTime,
"mem_usage": memUsage,
"goroutines": runtime.NumGoroutine(),
"uptime": uptime,
"task_count": taskCount,
"log_count": logCount,
+1
View File
@@ -313,6 +313,7 @@ export interface AboutInfo {
version: string
build_time: string
mem_usage: string
goroutines: number
uptime: string
task_count: number
log_count: number
+4
View File
@@ -60,6 +60,10 @@ onMounted(loadAbout)
<span class="text-muted-foreground text-sm">内存使用:</span>
<span class="text-sm">{{ aboutInfo?.mem_usage || '-' }}</span>
</div>
<div class="flex justify-between items-center">
<span class="text-muted-foreground text-sm">协程数量:</span>
<span class="text-sm">{{ aboutInfo?.goroutines || '-' }}</span>
</div>
<div class="flex justify-between items-center">
<span class="text-muted-foreground text-sm">运行时间:</span>
<span class="text-sm">{{ aboutInfo?.uptime || '-' }}</span>