Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Faisal Alanzi
Nebulo
Commits
ffb71fad
Commit
ffb71fad
authored
Jan 02, 2021
by
Daniel Wolf
Browse files
Also print memory info from runtime
parent
ce9d2eaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/com/frostnerd/smokescreen/service/ConnectionWatchdog.kt
View file @
ffb71fad
...
...
@@ -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"
)
})
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment