tikv / pprof-rs

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

How to get sample data continously though http port? #100

Closed raindust closed 2 years ago

raindust commented 2 years ago

Using "pprof" with go we usually start a server inside our programs and get the sample data on the web side, so that we can monitor our programs continuously. But I see the "pprof-rs" usage examples are usually in a scope: it start with a new ProfilerGuard, and end with guard.report().build() before exit the scope.

Can some show me an example about getting sample data continously though http port? I think "pprof-rs" can do this job because it has been used like here: https://pingcap.medium.com/quickly-find-rust-program-bottlenecks-online-using-a-go-tool-37be0546aa8f