LingxinMeng 1 жил өмнө
parent
commit
f56dddeb86

+ 1 - 1
test/monitor/main/main.go

@@ -25,7 +25,7 @@ func GetCpuPercent() float64 {
 
 // GetMemoryPercent 内存总占用率
 func GetMemoryPercent() float64 {
-	memory, _ := mem.SwapMemory()
+	memory, _ := mem.VirtualMemory()
 	return memory.UsedPercent
 }