jonhoo / inferno

A Rust port of FlameGraph
Other
1.65k stars 118 forks source link

Consider adding strokes to the rectangles representing a stack frame #248

Closed nagisa closed 2 years ago

nagisa commented 2 years ago

This is leaning towards a stylistic preference somewhat, but adding a stroke to all of the rectangles in a flamegraph should serve as a great way to separate the boxes from each other, especially when they are touching together. Today colour sets include multiple colours and one of the reasons for this I think to differentiate these frames that are touching together.

A stroke would also enable colour sets that are flatter, where colours are used to mark different types of frames, like proposed in #203.

Here's an example of what it might end up looking like. Note especially the rustix::io::mmap::mprotect and frames around it:

A screenshot of a flamegraph with some boxes touching

jonhoo commented 2 years ago

That's an interesting idea. I'm not a huge fan of it myself, but I could see it making certain graphs (much) easier to read. Maybe an option for this would be a good addition?