3 releases

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

#1559 in Parser implementations

Download history 139/week @ 2024-04-01 64/week @ 2024-04-08 46/week @ 2024-04-15 78/week @ 2024-04-22 80/week @ 2024-04-29 28/week @ 2024-05-06 28/week @ 2024-05-13 28/week @ 2024-05-20 46/week @ 2024-05-27 47/week @ 2024-06-03 41/week @ 2024-06-10 33/week @ 2024-06-17 41/week @ 2024-06-24 19/week @ 2024-07-01 50/week @ 2024-07-08 43/week @ 2024-07-15

158 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
~62K SLoC