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

implement node IDs and autozoom via href anchor #134

Closed
wants to merge 1 commit into from

Conversation

coffeetocode
Copy link

Hi Brendan,

I noticed that sometimes people email links to your flamegraph SVGs along with a screenshot of exactly where the sender was looking. So I implemented an href anchor-based ability to bookmark a specific zoomed view so that's it's explicit from just the link.

Here's an example: http://coffeetocode.net/media/example-perf.svg#?zoom=906

I regenerated example-perf.svg using gunzip -c example-perf-stacks.txt.gz | ./stackcollapse-perf.pl --kernel | ./flamegraph.pl --color=java --hash > example-perf.svg, but didn't yet do any of the other examples to keep this diff small.

Cheers,
PST

@brendangregg
Copy link
Owner

I think this is great. Although I've hesitated to merge as I tested it and it makes the SVGs 2.7% larger (extra id tags). Not a lot, but I keep hundreds of these around, and if there was a wake to make it 0%... Maybe it's possible to base the id on the x/y location of the rect, which is already in the SVG. I'll try it out when I get a chance.

@brendangregg
Copy link
Owner

fixed via #198 (I think).

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.

2 participants