SamSaffron / flamegraph

Flamegraph profiling support for Ruby 2.0
MIT License
382 stars 36 forks source link

Initial filtering prototype #12

Open CamJN opened 9 years ago

CamJN commented 9 years ago

I find that the lowest frames of the stack trace can often be in the way, and prevent otherwise adjacent frames from being combined. This is what I've been doing to throw out the rack and passenger frames, and is by no means merge-worthy but I find it's a good spot to throw out unwanted data and figured I'd share. Maybe you'll have an idea how to make this usable in a general sense.

The attached screenshots show the difference that even this crude version can make.

screen shot 2015-05-25 at 3 23 21 pm screen shot 2015-05-25 at 3 21 19 pm

SamSaffron commented 9 years ago

I am totally open to something like this but can we make it optional, you can even remember the option in local storage or something

just add a checkbox for it.

CamJN commented 9 years ago

Of course, it should be optional. I'm not sure how to access request params in the renderer, though. Any advice?

CamJN commented 9 years ago

In the meantime, added the missing sorting to make this a flame graph vs a flame chart. See: https://bugzilla.mozilla.org/show_bug.cgi?id=1123495

result: screen shot 2015-05-27 at 1 03 03 pm

SamSaffron commented 9 years ago

can't you just do all of this in the UI side, server payload can remain.

so default would be as it is now, then if you tick a box it kicks it into the other mode and rerenders (remembering the box is ticked using local storage)

On Thu, May 28, 2015 at 12:47 AM, Camden Narzt notifications@github.com wrote:

Of course, it should be optional. I'm not sure how to access request params in the renderer, though. Any advice?

— Reply to this email directly or view it on GitHub https://github.com/SamSaffron/flamegraph/pull/12#issuecomment-105940614.

CamJN commented 9 years ago

Then I'd have to reindex everything, but I suppose it could be done.

CamJN commented 9 years ago

Well, I tried; couldn't get the indexing to work client side. Either way you get the sorting corrected.