Automatic Flamegraphs for Benchmarks in Rust

This is just a short post about something I recently discovered in the Rust ecosystem:

Criterion + pprof = 🔥

Update: Based on this blog post, pprof now ships with a custom profiler for Criterion since version 0.4.2! Make sure to check out this example and enable "criterion" and "flamegraph" crate features.

Introduction

Criterion is a well-known and often-used benchmarking framework in the Rust ecosystem. If you’ve not yet heard of it, definitely check it out!