apache/horaedb

Add integration with rust-jemalloc-pprof for easy mem perf

jiacai2050 opened this issue · 4 comments

Describe This Problem

rust-jemalloc-pprof is a cool project to do memory perf.

Proposal

Add a new HTTP endpoint /debug/pprof/heap to serve the profiling.

Additional Context

We can remove old /debug/profile/heap/{seconds} endpoint when this is ready.

fn profile_heap(

@zuston Thanks, assigned.

@zuston Thanks, assigned.

From this crate doc, I found this way is not better than the vaillina jeprof way. It just generates the pprof format, if you want to dig it with human format, you have to execute in the host machine instead of any remote machine to call api directly. Because it still depends on the execute binary.

you have to execute in the host machine instead of any remote machine to call api directly.

What do you mean by call api directly?

With pprof, we can explore the perf data in various format, such as flamegraph