flame
flame copied to clipboard
An intrusive flamegraph profiling tool for rust.
The crate's code uses `extern crate serde_derive` without `#[cfg(feature = "json")]`, meaning that it doesn't compile if the `json` feature is disabled.
I've put the json dump from the example behind a `#[cfg(..)]` so the build works. However, the threads test fails without the feature. I'll need to look deeper into this.
Minimal test case: ``` use rayon::prelude::*; use flame; use std:: fs::File; fn something(i: usize) -> f64 { flame::start("Something"); std::thread::sleep(std::time::Duration::from_millis(10)); flame::end("Something"); 0.56 } fn main() { let a = (0..200).collect::() .par_iter()...
It appears like `flame::dump_html` writes json data to a script tag in the generated html file, without doing json or html escaping. That means that the generated page could be...
Now that `inferno` is relatively stable, and exposes separate APIs for both stack folding and [producing flamegraphs](https://docs.rs/inferno/0.9.0/inferno/flamegraph/index.html), I wonder if it'd be interesting to see if we could make `flame`...
Right now, notes are only in the in-memory data structures, they don't get output to stdout or HTML.
Since your lib requires modifications to the source code, it's not easy to disable it for a true release. I see two ways to fix this: - Add a compile...
I think at least, that this is how it works? I spent some time trying to figure out why I got an empty graph when all profiling happens in other...
I found that you have a `threads()` function, from which I can get a `Vec` for each thread. But `Span` only has a function to write to json, not html....
I use flame for a ray tracer, which roughly correspond to ```rust for i in 0..x { for j in 0..y { let _guard = flame::start_guard("compute color"); out[i][j] = compute_color(i,...