LingxinMeng 1 год назад
Родитель
Сommit
f56dddeb86
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      test/monitor/main/main.go

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

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