Crate of the Week

Hi, I'd like to self-nominate ying-profiler,
a sampling memory profiler for Rust apps.

Compared to other memory profilers, ying is Rust-native, only requires two lines to use it as your GlobalAlloc, very low overhead (with a default 1/500th sampling rate) so it can be used in production, and is super easy to use compared to others:

  • It can automatically produce flamegraphs when the retained memory usage changes by a given percentage
  • No need to write clumsy scripts and do clumsy environment variable configuration
use ying_profiler::YingProfiler;

#[global_allocator]
static YING_ALLOC: YingProfiler = YingProfiler::default();

fn main() {
    YING_ALLOC.start_profiling();
    // ... the rest of your program
}

https://crates.io/crates/ying-profiler