tikv / pprof-rs

A Rust CPU profiler implemented with the help of backtrace-rs
Apache License 2.0
1.32k stars 104 forks source link

how to use pprof-rs in async-program #120

Open wpcchengxuyuan opened 2 years ago

wpcchengxuyuan commented 2 years ago

is there any way to support async-program, ex. tokio

ileixe commented 1 year ago

Did you get an answer? I also need specific functions in async context.

Strange to say, some function (e.g. BytesMut::clone()) was appeared, so I wonder what's difference. (Same code with non-async context appeared correctly)

image

ileixe commented 1 year ago

I'm not sure my theory is correct or not, but from my understanding about the cpu sampling behavior, async function called via poll() may not be captured as it's just one very short function call :thinking: