Hi, Golang runtime profiler (for cpu & trace) gives us an option to decide the time of profiling. It then sets the rate of profiling at start of the call and reset the rate at the end of the call. So it goes like this
CPUProfiling() { StartCPUProfile() // internally calls SetCPUProfileRate(100) sleep(seconds) StopCPUProfile () // internally calls SetCPUProfileRate(0) } On the other hand for mutex and block profiling, it expects us to set the rate at the start of the application and while calling profiling, it just gathers the information and return. My doubt is why mutex and block profiling have different behaviour ? Here also we could have set the rate at call start and reset at call end with some sleep time. Thanks, Nidhi -- 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/CACcVEiUTe%2BmYtW6i4kq%3DEwVqnnn8_tb7BYJS846ZBvgPujzPpg%40mail.gmail.com.