what-studio / profiling

Was an interactive continuous Python profiler.
BSD 3-Clause "New" or "Revised" License
2.97k stars 113 forks source link

Filter packages / modules #30

Open bgagnon opened 9 years ago

bgagnon commented 9 years ago

Add the ability to filter out entire packages and/or modules from the profiling report.

sublee commented 9 years ago

How you expect the interface?

bgagnon commented 9 years ago

Good question. I suppose I would use a keyboard shortcut which would bring up a small "Filter Out" menu for the currently selected line. It would offer:

Filtered frames would then either be removed completely from the stack, or grayed out. I would expect the percentage statistics to be updated accordingly (ie. if two functions were responsible together for 100% and 50% to each, filtering out the first would now show 100% for the second function). Not sure how you would interactively un-filter -- perhaps through a separate panel that shows active filters.

Here's my concrete use case: I have an application based on Twisted, which has many tentacles throughout the call graphs. From a profiling perspective, I am not interested in anything attributed to Twisted -- I only want to see my code in the report. I would thus filter out the "twisted.*" packages. I imagine developers working with other frameworks like Django would appreciate this as well.

sublee commented 9 years ago

Thanks to propose. It's a really good feature. I never imagined filtering from the viewer-side.

I think I should design the exact user interface. When I got an idea, I will comment here.

tony commented 8 years ago

I really want to see this.

@sublee: have you ever tried htop?

If you use htop, you can use F3 to search across entries, and F4 to filter them.