From: Andrew Svetlov Date: Sun, 7 Oct 2012 16:18:39 +0000 (+0300) Subject: Issue #14900: Add aliases for sorting params for pstat to follow column names from... X-Git-Tag: v3.2.4rc1~461 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c3e5b10ae76c3ffe8672e91a5478a19e35b60220;p=thirdparty%2FPython%2Fcpython.git Issue #14900: Add aliases for sorting params for pstat to follow column names from pstat output. Patch by Arne Babenhauserheide. --- diff --git a/Lib/pstats.py b/Lib/pstats.py index a41962aef62d..bfbaa41386e7 100644 --- a/Lib/pstats.py +++ b/Lib/pstats.py @@ -159,8 +159,11 @@ class Stats: # along with some printable description sort_arg_dict_default = { "calls" : (((1,-1), ), "call count"), + "ncalls" : (((1,-1), ), "call count"), + "cumtime" : (((3,-1), ), "cumulative time"), "cumulative": (((3,-1), ), "cumulative time"), "file" : (((4, 1), ), "file name"), + "filename" : (((4, 1), ), "file name"), "line" : (((5, 1), ), "line number"), "module" : (((4, 1), ), "file name"), "name" : (((6, 1), ), "function name"), @@ -168,6 +171,7 @@ class Stats: "pcalls" : (((0,-1), ), "primitive call count"), "stdname" : (((7, 1), ), "standard name"), "time" : (((2,-1), ), "internal time"), + "tottime" : (((2,-1), ), "internal time"), } def get_sort_arg_defs(self):