#format #data #export #profile #spans #flame #speedscope

flamescope

Export flame data to speedscopes profile format

3 releases

0.1.2 Jun 9, 2021
0.1.1 Jul 10, 2019
0.1.0 Jul 10, 2019

#1602 in Parser implementations

Download history 12/week @ 2023-11-20 5/week @ 2023-11-27 10/week @ 2023-12-04 9/week @ 2023-12-11 17/week @ 2023-12-18 63/week @ 2023-12-25 25/week @ 2024-01-01 41/week @ 2024-01-08 24/week @ 2024-01-15 26/week @ 2024-01-22 5/week @ 2024-01-29 30/week @ 2024-02-05 48/week @ 2024-02-12 41/week @ 2024-02-19 50/week @ 2024-02-26 42/week @ 2024-03-04

182 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.4–3.5MB
~63K SLoC