3 releases

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

#204 in Profiling

Download history 90/week @ 2023-10-31 70/week @ 2023-11-07 61/week @ 2023-11-14 60/week @ 2023-11-21 42/week @ 2023-11-28 43/week @ 2023-12-05 52/week @ 2023-12-12 60/week @ 2023-12-19 117/week @ 2023-12-26 68/week @ 2024-01-02 71/week @ 2024-01-09 73/week @ 2024-01-16 51/week @ 2024-01-23 49/week @ 2024-01-30 69/week @ 2024-02-06 103/week @ 2024-02-13

289 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