Commit ffb71fad authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Also print memory info from runtime

parent ce9d2eaa
......@@ -124,6 +124,9 @@ class ConnectionWatchdog(private val trafficStats: TrafficStats,
val nativeHeapSize = Debug.getNativeHeapSize()
val nativeHeapFreeSize = Debug.getNativeHeapFreeSize()
val memInfo = trafficStats.memInfo()
val runtimeTotalSize = Runtime.getRuntime().totalMemory()
val runtimeFreeSize = Runtime.getRuntime().freeMemory()
log(buildString {
append("MemInfo: [")
append("OpenSockets: ")
......@@ -146,9 +149,12 @@ class ConnectionWatchdog(private val trafficStats: TrafficStats,
append(memInfo?.waitingPacketSize ?: "?")
append(", HeapSize: ")
append(nativeHeapSize/1000/1000)
append("mb")
append(", FreeHeap: ")
append("mb, FreeHeap: ")
append(nativeHeapFreeSize/1000/1000)
append("mb, RuntimeSize: ")
append(runtimeTotalSize/1000/1000)
append("mb, FreeRuntimeSize: ")
append(runtimeFreeSize/1000/1000)
append("mb")
})
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment