The profile output is empty because the blocking profile is disabled by default. You have to set a profiling rate using the runtime package.
http://golang.org/pkg/runtime/#SetBlockProfileRate
Typically you would set it to something like 1%, then leave it on for enough time to collect interesting samples for your application, then disable it again. After that the blocking profile fetched via HTTP will have data.
The exact rate and period of collection you should use is application dependent - it's a balance between instrumentation precision and execution overhead. Experimentation is the best way to find what works best for you (ie: collect more blocking samples as fast as possible but without hurting your system performance too much).
The more interest part is how to interpret the data, and tell when a blocking time is benign (e.g: waiting for IO) or not (e.g: excessive locking).
--
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.