pkg / profile

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

Error in running with profile package #42

Closed b5y closed 7 years ago

b5y commented 7 years ago

Hello!

I am going to use profile package to find places to optimize my project. I have followed description and used just defer profile.Start().Stop() with import to run the profiler. The problem is I always get this error: parsing profile: unrecognized profile format. I tried to run the application with these commands:

go tool pprof —text ./myapp ./pro/cpu.pprof > prof.txt

go tool pprof —pdf ./myapp

What I did wrong? An application is simple as abc: it is little microservice which uses http package and runs cmd tool to get its output.

Thank you in advance.

b5y commented 7 years ago

already found solution