#perf #profiler #report #programs #implemented #help #cpu

rsperftools

An internal perf tools for rust programs

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

#206 in Profiling

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–17MB
~227K SLoC