pkg / profile

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

Using MemProfileAllocs sample in the readme #55

Closed bitcodr closed 4 years ago

bitcodr commented 4 years ago

In the readme, there is an example which is shows how to use profile.MemProfileAllocs in the Start function, but the sample is wrong and you'll get an error like

cannot use profile.MemProfileAllocs (type func() func(*profile.Profile)) as type func(*profile.Profile) in argument to profile.Start

And the readme should be p := profile.Start(profile.MemProfileAllocs(), profile.ProfilePath("."), profile.NoShutdownHook)

So if do you confirm it's wrong can I send a PR to fix the readme or the codebase?

davecheney commented 4 years ago

Opps. Thanks for spotting that. Fix coming up