Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[post] How to use pprof in Go #50

Open
at15 opened this issue Jun 25, 2020 · 0 comments
Open

[post] How to use pprof in Go #50

at15 opened this issue Jun 25, 2020 · 0 comments

Comments

@at15
Copy link
Member

at15 commented Jun 25, 2020

Type

  • request post from @at15

Related

Description

Benchmark w/o profiling is not very useful, you need to know where is the bottleneck.
There are many pprof posts online. However, every time I need to use pprof I found most top ranked search result are not good enough and outdated.

This post plans to cover the following

  • get profile data
    • in test using -cpuprofile
    • using http handler w/ custom route
    • dump to specific place in application code
  • read profile data
    • what is cumulative
    • why the sample time is larger than actual execution time (hint: you got more than one core)
    • flamegraph (honestly I found the default svg more useful than flamegraph for simple use cases)
  • internal of profile format
    • the proto
    • analysis pprof data in your own code
  • pprof in other languages
    • pingcap has one in rust
    • not sure about cpp and java, google might have it?
  • compare with perf
  • efficient storage of pprof data
    • this is mainly for benchhub ... I want to find a low cost way for compressing and querying profile data

Update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant