diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-10-07 16:19:34 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-10-07 16:19:34 (GMT) |
commit | 08ab95485b7d94a6a0d09642b36f6a242fba6bd2 (patch) | |
tree | c6ffc354509d0f9b543d85a92942d4a04e706d9d /Lib | |
parent | 1558d79b82729a87c56f2bdfc033c32e7b1f03c9 (diff) | |
parent | 3e5dae0ee290a2f16e14e8f9af01dd0214063f21 (diff) | |
download | cpython-08ab95485b7d94a6a0d09642b36f6a242fba6bd2.zip cpython-08ab95485b7d94a6a0d09642b36f6a242fba6bd2.tar.gz cpython-08ab95485b7d94a6a0d09642b36f6a242fba6bd2.tar.bz2 |
Merge issue #14900: Add aliases for sorting params for pstat to follow column names from pstat output.
Patch by Arne Babenhauserheide.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/pstats.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/pstats.py b/Lib/pstats.py index 268cc01..6a77605 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): |