pkg / profile

Simple profiling for Go
BSD 2-Clause "Simplified" License
1.99k stars 124 forks source link

Is it possible to enable two profiles at the same time. #38

Closed aambati closed 7 years ago

aambati commented 7 years ago

I would like to profile both heap and cpu at the same time. It seems to be possible (although i have not tried) with runtime/pprof package API. I have tried profile.Start(opt, profile.CPUProfile, profile.MemProfile), that only produced mem.pprof file. Quick scan of the code (switch statement) makes me think it is not possible

davecheney commented 7 years ago

No, this is not possible by design. Enabling multiple profiles at one time generates incorrect results.

On Tue, 18 Apr 2017, 06:24 Anil Ambati notifications@github.com wrote:

I would like to profile both heap and cpu at the same time. It seems to be possible (although i have not tried) with runtime/pprof package API. I have tried profile.Start(opt, profile.CPUProfile, profile.MemProfile), that only produced mem.pprof file. Quick scan of the code (switch statement) makes me think it is not possible

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pkg/profile/issues/38, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAcA2wRO6f03kjztqF7oLocSJ32UdP1ks5rw8p6gaJpZM4M_h5J .