Closed thnk2wn closed 3 years ago
How much work is your program doing between starting and stopping the profile?
@davecheney I ran the API app for about 5 minutes and made several requests over HTTP and web sockets that hit PostgreSQL, Elastic Search, Redis, 3rd party APIs, S3, etc.
Seems reasonable; how are you stopping the program, or the profile?
SIGINT with Ctrl+C. File was 0 bytes during execution and 10 bytes at the end.
On January 16, 2021, docker-desktop-robot notifications@github.com wrote:
Seems reasonable; how are you stopping the program, or the profile?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pkg/profile/issues/57#issuecomment-761626616, or unsubscribe https://github.com/notifications/unsubscribe- auth/AAA5NUI2LPAVJRI3AG7YIA3S2HYM5ANCNFSM4WEIIRLQ.
Can you reproduce the issue on a non big sur machine? Maybe try the trace profile not CPU profile. Perhaps pprof is broken on big sur
For my needs https://github.com/gin-contrib/pprof worked but can maybe look into this more later. Thanks
ok, no problem. I'll close this for the moment, please feel free to reopen it in the future.
After profiling I get a 10 byte file (cpu.pprof.zip) that when read produces:
cpu.pprof: decompressing profile: unexpected EOF
( Withgo tool pprof cpu.pprof
)Unexpected end of ZLIB input stream
(With Goland)Tried both:
as well as:
As of 3704c8d23324a3fc0771ad2c1cef0aa4e9459f6f on macOS Big Sur 11.1.
With the shutdown hook I saw the library was intercepting shutdown to stop profiling. Without it I see my code called to
.Stop()
.Troubleshooting ideas?
Thanks for your work.