3 ms·
Is there sth like this for Go?
by iillexial 5y ago
Is there sth like this for Go?
- mjibson 5y agoHaving programmed in both Rust and Go: I mostly didn't need what this does in Go because my problem was usually solved by panic'ing, which prints a stack trace of each go routine, allowing me to get enough of the way through figuring out my current problem (usually something was stuck waiting or sending). In tokio, there's no such print-stack behavior, so it's much harder to get a snapshot of what's going on. (I'm relatively new to tokio and Rust, so there's perhaps a handy "print all the tokio tasks and their stack traces" method, but I haven't come across it yet.) If folks use this console thing for perf reasons and not debug reasons, then yeah, maybe cool to have in Go.
- pse_pan2233 5y agohttps://pkg.go.dev/net/http/pprof https://pkg.go.dev/net/http/pprof Goland (the IDE) has some nice integration: https://blog.jetbrains.com/go/2020/03/03/how-to-find-goroutines-during-debugging/ https://blog.jetbrains.com/go/2020/03/03/how-to-find-gorouti...