gak / pycallgraph

pycallgraph is a Python module that creates call graphs for Python programs.
GNU General Public License v2.0
1.83k stars 335 forks source link

Feature request: ability to set a time threshold #148

Open colinmorris opened 9 years ago

colinmorris commented 9 years ago

My call graphs often have a long tail of functions that have a trivial impact on my program's total running time (e.g. a function that's called twice for a total time of 0.000101s), and these can dominate the real estate of the graph.

It's awesome that nodes are colour-coded according to time, but it would be great to be able to go further and say 'don't show any nodes for functions with less than 0.01s'.

(This would be trivial to implement if each node had a notion of 'cumulative time' including time spent in subfunctions. Filtering by tottime won't really work, because then you end up removing parents of significant functions and leaving them orphaned.)