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

adding consistent palette option + cleanup tabs/spaces etc. #25

Merged
merged 5 commits into from
Nov 25, 2013

Conversation

shawn-sterling
Copy link
Contributor

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.

@brendangregg
Copy link
Owner

Wow, the palette-example-broken.svg example really works, and an efficient way to do it - switching to a different --colors palette for the differences. I'll be trying this out myself for similar debugging cases. Thanks!

brendangregg added a commit that referenced this pull request Nov 25, 2013
adding consistent palette option + cleanup tabs/spaces etc.
@brendangregg brendangregg merged commit d9d56df into brendangregg:master Nov 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants