No support to run multiple profile
prakashettigar opened this issue · 6 comments
prakashettigar commented
profile.Start(profile.MemProfile, profile.ProfilePath("."), profile.NoShutdownHook)
profile.Start(profile.CPUProfile, profile.ProfilePath("."), profile.NoShutdownHook)
Starting multiple profiles throws an error : profile: Start() already called
davecheney commented
This is a deliberate design choice.
10sor commented
@davecheney can you please explain why?
davecheney commented
Running multiple profiles at the same time causes interference.
yonderblue commented
@davecheney is the interference something that breaks or just skew results? For example with mem+cpu the coarse relative picture seems to hold up well in cases I've checked despite the overhead.
davecheney commented
It skews the results.
LiranBri commented
I suggest to add the explanation to the actual error, as it's not trivial as in fact it makes the pkg do more than just a convenient proxy to the native API, because the native API does allow running multiple profilers.
If you agree I can make the PR