Finish memory statistics information api
This commit is contained in:
@@ -10,6 +10,4 @@ interface IStatisticsService {
|
||||
fun cpu(): CpuInfoVo
|
||||
|
||||
fun memory(): MemoryInfoVo
|
||||
|
||||
fun jvm(): JvmInfoVo
|
||||
}
|
||||
@@ -118,11 +118,8 @@ class StatisticsServiceImpl : IStatisticsService {
|
||||
virtualMax = systemInfo.hardware.memory.virtualMemory.virtualMax,
|
||||
virtualInUse = systemInfo.hardware.memory.virtualMemory.virtualInUse,
|
||||
swapTotal = systemInfo.hardware.memory.virtualMemory.swapTotal,
|
||||
swapUsed = systemInfo.hardware.memory.virtualMemory.swapUsed
|
||||
)
|
||||
|
||||
override fun jvm() = JvmInfoVo(
|
||||
totalMemory = runtime.totalMemory(),
|
||||
freeMemory = runtime.freeMemory()
|
||||
swapUsed = systemInfo.hardware.memory.virtualMemory.swapUsed,
|
||||
jvmTotal = runtime.totalMemory(),
|
||||
jvmFree = runtime.freeMemory()
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user