chore: add goroutine num display
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user