Hi, I have an RPC server which has heterogenous requests, e.g. some calls hit cache and are cheaper to serve while others need to compute a result.
Is there any way to keep track of the cpu used just by one particular goroutine[1]? It seems like there's not a straightforward way today without adding logic around every single blocking piece (to start/stop a timer), and in the future will become completely impossible with "Non-cooperative goroutine preemption". I would be happy with only knowing this number when a goroutine finishes. I'm familiar with using pprof for measuring the entire process, but it's not clear to me how to go from there to what was used by a particular RPC, and I also can't enable profiling for every request. Thanks, -Steve 1: I really want a goroutine and its children, but I create new goroutines in few enough places that I could do some context mgmt to manage this. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/e2d7e3d7-c678-4515-9cdb-060d29b14500%40googlegroups.com.