Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
pprof 0.3.5 - Docs.rs
[go: Go Back, main page]

pprof 0.3.5

An internal perf tools for rust programs.
Documentation

pprof


let guard = pprof::ProfilerGuard::new(100).unwrap();

// Some codes

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

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