LingxinMeng 1 năm trước cách đây
mục cha
commit
f56dddeb86
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      test/monitor/main/main.go

+ 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
 }