Re: [go-nuts] Doubts regarding implementation of runtime profiler

2019-10-21 Thread Nidhi Agrawal
Ok, Thanks. On Mon, Oct 21, 2019 at 5:42 PM Ian Lance Taylor wrote: > On Mon, Oct 21, 2019 at 4:38 AM Nidhi Agrawal > wrote: > > > > Ok, Also is there any harm if we set block/mutex rate at the start of > the program ? Will it cause any memory allocations or any kind of

Re: [go-nuts] Doubts regarding implementation of runtime profiler

2019-10-21 Thread Nidhi Agrawal
Ok, Also is there any harm if we set block/mutex rate at the start of the program ? Will it cause any memory allocations or any kind of performance impact? On Mon, Oct 21, 2019 at 2:47 PM Ian Lance Taylor wrote: > On Sun, Oct 20, 2019 at 8:57 PM Nidhi Agrawal > wrote: > > > >

Re: [go-nuts] Doubts regarding implementation of runtime profiler

2019-10-20 Thread Nidhi Agrawal
supposed to set the rate. On Sun, Oct 20, 2019 at 1:27 PM Ian Lance Taylor wrote: > On Sun, Oct 20, 2019 at 12:51 AM Nidhi Agrawal > wrote: > > > > I came to this conclusion because the pprof implemented the cpu with the > assumption that the client gives how much time to capture

Re: [go-nuts] Doubts regarding implementation of runtime profiler

2019-10-20 Thread Nidhi Agrawal
> On Sun, Oct 20, 2019 at 12:36 AM Nidhi Agrawal > wrote: > > > > Because it is explicitly written in the documentation here > https://golang.org/pkg/net/http/pprof/ that we should set block profile > rate at the start of application, unlike CPU profiling where the rat

Re: [go-nuts] Doubts regarding implementation of runtime profiler

2019-10-20 Thread Nidhi Agrawal
Oct 20, 2019 at 12:58 PM Ian Lance Taylor wrote: > On Sun, Oct 20, 2019 at 12:23 AM Nidhi Agrawal > wrote: > > > > Ok, Is it necessary to call SetBlockProfileRate at the start of > application? > > If not then we can call it just before starting block profile and aft

Re: [go-nuts] Doubts regarding implementation of runtime profiler

2019-10-20 Thread Nidhi Agrawal
: > On Sat, Oct 19, 2019 at 10:17 PM Nidhi Agrawal > wrote: > > > > > > https://golang.org/src/runtime/mprof.go, > https://golang.org/pkg/net/http/pprof/ here it is mentioned that we need > to set SetBlockProfileRate to get enable block profile. > > > > In

Re: [go-nuts] Doubts regarding implementation of runtime profiler

2019-10-19 Thread Nidhi Agrawal
am doing something like: *SetBlockProfileRate(1)* *pprof.Lookup("block").WriteTo(f, 0); * *SetBlockProfileRate(0)* On Sun, Oct 20, 2019 at 10:24 AM Ian Lance Taylor wrote: > On Sat, Oct 19, 2019 at 7:34 PM Nidhi Agrawal > wrote: > > > > We don't need to set MemP

Re: [go-nuts] Doubts regarding implementation of runtime profiler

2019-10-19 Thread Nidhi Agrawal
Lance Taylor wrote: > On Fri, Oct 18, 2019 at 11:03 PM Nidhi Agrawal > wrote: > > > > 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 r

[go-nuts] Doubts regarding implementation of runtime profiler

2019-10-18 Thread Nidhi Agrawal
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