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

implement criterion Profiler #53

Closed YangKeao closed 3 years ago

YangKeao commented 3 years ago

Signed-off-by: Yang Keao keao.yang@yahoo.com

In this PR, I provide an implementation of criterion::Profiler in the pprof-rs, so that the users of pprof-rs and criterion would be easier to integrate and benefit from them.

Inspired by criterion, maybe we can generate Differential Flame Graphs for two benchmarks in the future, which would be really awesome (though criterion doesn't support it yet).

YangKeao commented 3 years ago

Hi @jibbow ! Thanks for your article Automatic Flamegraphs for Benchmarks in Rust. I realize that providing an implementation of criterion::Profiler inside the pprof-rs would be more helpful (and cool :smile_cat: ). Can you help me to check/test this PR or do you have more advice on this?

andreas-zimmerer commented 3 years ago

Wow that's awesome!! Thanks for pinging me on that :blush: Adding this directly to pprof-rs is a nice idea, love it! It feels good that my blog post made it into the project :innocent:

I will add this to my post when this PR has been merged.

Hexilee commented 3 years ago

I don't have the writing accessibility to this repo, maybe you can merge it forcibly.

YangKeao commented 3 years ago

I don't have the writing accessibility to this repo, maybe you can merge it forcibly.

Now, you have :smiling_imp:

andreas-zimmerer commented 3 years ago

FYI I updated my blog post and and it now includes a reference to the new criterion profiler in pprof :blush: Thanks again!