Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement request: flamegraph colors #22

Open
PenelopeFudd opened this issue Feb 18, 2014 · 2 comments
Open

Enhancement request: flamegraph colors #22

PenelopeFudd opened this issue Feb 18, 2014 · 2 comments

Comments

@PenelopeFudd
Copy link

If you run the same program the same way, the flame graph looks the same... except for the colors! I'm running programs and making changes, and I'm never quite sure if two flame graphs are equivalent.

Underneath the flame graph, there's a warning that says the colors and x-axis position are not meaningful, but that's not exactly true. The x-axis has function names sorted alphabetically at each level of the stack; the result is a canonical ordering of the information that allows graphs to be compared in a meaningful way. The same could be done with color, where instead of random coloring, the random number generator could be given a fixed seed, or replaced with a counter (modulo the number of colors).

That way, you could flick back and forth between two tabs and see at a glance that since all the colors are the same and the shape is the same, the call graph must be the same. Adding or removing a single call would completely change the coloring of the graph.

For extra bonus karma, if only part of the graph has changed, then only that part should change colors, but that's more complicated than replacing the random number generator; the colors in the call stack would depend on the color of the level below them.

Cheers!

@timbunce
Copy link
Owner

Interesting idea. Should be easy for you to try out and send me a pull request ;)

@timbunce
Copy link
Owner

timbunce commented Aug 2, 2015

See the new --cp option.
The new --hash option might also work well and would be simpler (because it doesn't require copying the pallet file between runs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants