flamegraph icon indicating copy to clipboard operation
flamegraph copied to clipboard

[Feature Request] Show Progress

Open lixin-wei opened this issue 1 year ago • 3 comments

In my case, perf.data is huge(10GB+) and usually takes 30+ min to generate the flame graph.

It will be much more friendly if there is a progress bar.

lixin-wei avatar Jul 06 '23 10:07 lixin-wei

Unfortunately I don't have much time for maintaining flamegraph. Maybe consider submitting a PR?

djc avatar Jul 06 '23 11:07 djc

Is there any doc about the overall structure/execution path of this project? I'm willing to have a try but don't know where to start.

lixin-wei avatar Jul 06 '23 11:07 lixin-wei

No, but it's pretty simple. We get the inferno crate to collapse the data at https://github.com/flamegraph-rs/flamegraph/blob/main/src/lib.rs#L367 and generate the flamegraph at https://github.com/flamegraph-rs/flamegraph/blob/main/src/lib.rs#L427. You should figure which of those is slow. Then, I think you might want to wrap an indicatif thing around the input to either of those things (or both?).

djc avatar Jul 06 '23 11:07 djc