4 releases

0.1.3 Aug 29, 2024
0.1.2 Jun 9, 2021
0.1.1 Jul 10, 2019
0.1.0 Jul 10, 2019

#109 in Profiling

Download history 26/week @ 2024-07-29 104/week @ 2024-08-05 25/week @ 2024-08-12 20/week @ 2024-08-19 144/week @ 2024-08-26 18/week @ 2024-09-02 25/week @ 2024-09-09 56/week @ 2024-09-16 54/week @ 2024-09-23 31/week @ 2024-09-30 5/week @ 2024-10-07 32/week @ 2024-10-14 29/week @ 2024-10-21 43/week @ 2024-10-28 51/week @ 2024-11-04 38/week @ 2024-11-11

163 downloads per month
Used in rustpython

MIT license

9KB
140 lines

flamescope

Export flame data to speedscope's format.

Usage

use flame;
use flamescope;
use std::fs::File;

fn main() {
    let main_guard = flame::start_guard("main");
    {
        let _scope_guard = flame::start_guard("inner scope");
    }
    main_guard.end();
    flamescope::dump(&mut File::create("flamescope.json").unwrap()).unwrap();
}

License

This project is licensed under the MIT license. Please see the LICENSE file for more details.


lib.rs:

Export flame data to speedscope's profile format.

Base profile's are derived from top-level spans, so it's recommended to ensure that you have an appropriately named span that encompasses the entire run of the program.

Dependencies

~2.3–3.5MB
~64K SLoC