[go-nuts] Determining memory use of structs containing slices

2018-09-04 Thread Ingo Jaeckel
https://play.golang.org/p/7ZAN9AuEGfD It seems the length of a slice is not considered by unsafe.SizeOf . I assume this is a side effect of .SizeOf being evaluated at compile time? What are other idiomatic ways to determine the runtime memory use of a str

[go-nuts] Re: Looking for a way to monitor all active Go channels

2018-08-29 Thread Ingo Jaeckel
Thanks for the suggestion. I outlined the proposal on https://github.com/golang/go/issues/27347. I agree this needs a careful design. On Wednesday, August 29, 2018 at 2:05:32 AM UTC-7, Ingo Oeser wrote: > > I would suggest opening an issue for that, if it isn't. > > A runtime provided profile

[go-nuts] Looking for a way to monitor all active Go channels

2018-08-28 Thread Ingo Jaeckel
I am building lots of apps where the consumer/producer pattern plays a big role. Usually, I end up tracking metrics on individual Go channels (e.g. enqueue/dequeue rate, periodically calling len(channel)). This works well to confirm if channels have the right capacity, consumers are keeping up,