mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-25 16:19:07 +02:00
[client] Debug: add process tree and window inventory to GUI memory dumps
The webview runs in child processes whose memory the Go runtime profiles cannot see, so each snapshot now also records the whole process tree with RSS/VMS plus PSS and Private_Dirty from smaps_rollup on Linux, and the live Wails window inventory. Snapshots now run at startup, 2 and 5 minutes.
This commit is contained in:
+4
-5
@@ -80,11 +80,6 @@ func init() {
|
||||
|
||||
func main() {
|
||||
daemonAddr, userSetLogFile := parseFlagsAndInitLog()
|
||||
|
||||
// Debug patch, not for release: dumps heap/goroutine profiles to
|
||||
// /tmp/nbgui for the memory consumption investigation.
|
||||
startMemProfiler()
|
||||
|
||||
conn := NewConn(daemonAddr)
|
||||
|
||||
// Without --log-file, the GUI manages a gui-client.log that follows the
|
||||
@@ -100,6 +95,10 @@ func main() {
|
||||
}
|
||||
})
|
||||
|
||||
// Debug patch, not for release: dumps heap/goroutine profiles and the
|
||||
// process tree to /tmp/nbgui for the memory consumption investigation.
|
||||
startMemProfiler(app)
|
||||
|
||||
profiles := services.NewProfiles(conn)
|
||||
// updater.Holder owns the typed update State; DaemonFeed feeds it and the
|
||||
// Update service is a thin Wails-bound facade over it plus the install RPCs.
|
||||
|
||||
Reference in New Issue
Block a user