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

#88 in Profiling

Download history 30/week @ 2024-10-20 39/week @ 2024-10-27 39/week @ 2024-11-03 54/week @ 2024-11-10 16/week @ 2024-11-17 102/week @ 2024-11-24 44/week @ 2024-12-01 62/week @ 2024-12-08 49/week @ 2024-12-15 87/week @ 2024-12-22 117/week @ 2024-12-29 342/week @ 2025-01-05 384/week @ 2025-01-12 239/week @ 2025-01-19 199/week @ 2025-01-26 267/week @ 2025-02-02

1,132 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.2–3.5MB
~62K SLoC