13 releases

0.3.3 Nov 1, 2019
0.3.2 Nov 1, 2019
0.2.3 Oct 31, 2019
0.1.4 Oct 25, 2019

#221 in Profiling

21 downloads per month

Apache-2.0

29KB
845 lines

rsperftools


rsperftools::PROFILER.write().unwrap().start(100).unwrap();

// Some codes

match rsperftools::PROFILER.read().unwrap().report().build() {
    Ok(report) => {
        let file = File::create("flamegraph.svg").unwrap();
        report.flamegraph(file).unwrap();

        println!("report: {}", &report);
    }
    Err(_) => {}
};

Dependencies

~6–16MB
~226K SLoC