adding consistent palette option + cleanup tabs/spaces etc. #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello Brendan!
First of all, I was at LISA13, attended both of your talks; loved them. I have been using flamegraph quite a bit since then, thank you for creating this tool!
The feature I added creates a palette file so the colors will be consistent. I know you have the --hash option; but that is not quite what I was looking for (also the hash option colors (for what I'm doing) are very close together so It's hard to tell anything apart).
This lets me have a baseline color map, and on the second flamegraph I set a different $colors and it makes the differences really stand out. If you take a look at the example svgs I have put in the demos dir, you will see what I mean (updated documentation with more details).
Also, this lets you manually edit the colors so you can set some key functions to hot pink or whatever to make them stand out like a sore thumb. I imagine building up a very large palette file over time with many custom colors for particular symbols.
Lastly if you don't think this is a good fit, no worries.
Have a good day.
-Shawn
Note1: My perl is rusty (switched to python) and the perl mafia may kill me for not using Storable to write the hash to disk, but I was following your lead of not using any additional modules. :)
Note2: From the looks of it you are using 8 column width tab tabs, and Tim Bunce is using space tabs. I tried to make it all tab tabs but fear I may have screwed up the spacing. I use 4 column space tabs so I'm a stranger in a strange land here :) . I added a vim modeline at the bottom of what it appears you are using. If you let me know your actual settings I'll fix the tabs/spacing and do another pull request.
Note3: I couldn't think of a better option/name for "--cp" happy to call it something else if you think of something better.