From: W. Trevor King Date: Thu, 12 May 2011 13:44:55 +0000 (-0400) Subject: Mention Stats.print_callees() in doc/hacking.txt. X-Git-Tag: 1.1.0~190 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ef9efac025ff5f31d5e2c2b7fa5331fd52bf80eb;p=be.git Mention Stats.print_callees() in doc/hacking.txt. --- diff --git a/doc/hacking.txt b/doc/hacking.txt index 4c5a464..941dfde 100644 --- a/doc/hacking.txt +++ b/doc/hacking.txt @@ -82,3 +82,7 @@ You can also toss:: print >> sys.stderr, '-'*60, '\n', '\n'.join(traceback.format_stack()[-10:]) into the function itself for a depth-first caller list. + +For a more top-down approach, try:: + + $ python -c "import pstats; p=pstats.Stats('profile'); p.sort_stats('cumulative').print_callees(20)"