#profiling #flamegraph #profile #export

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

#171 in Profiling

Download history 83/week @ 2022-12-01 138/week @ 2022-12-08 71/week @ 2022-12-15 50/week @ 2022-12-22 39/week @ 2022-12-29 51/week @ 2023-01-05 78/week @ 2023-01-12 113/week @ 2023-01-19 59/week @ 2023-01-26 84/week @ 2023-02-02 89/week @ 2023-02-09 222/week @ 2023-02-16 173/week @ 2023-02-23 54/week @ 2023-03-02 80/week @ 2023-03-09 88/week @ 2023-03-16

469 downloads per month
Used in rustpython

MIT license

8KB
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–3MB
~64K SLoC