summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-10-07 16:17:15 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-10-07 16:17:15 (GMT)
commite4831f6b1296869afd7ac88e674196a599542d50 (patch)
tree97baf8ac8ae2aa95a3acd12bf7420a4e80dadbc6
parent75033a38d97139fc105c553b852626808459868d (diff)
downloadcpython-e4831f6b1296869afd7ac88e674196a599542d50.zip
cpython-e4831f6b1296869afd7ac88e674196a599542d50.tar.gz
cpython-e4831f6b1296869afd7ac88e674196a599542d50.tar.bz2
Issue #14900: Add aliases for sorting params for pstat to follow column names from pstat output.
Patch by Arne Babenhauserheide.
-rw-r--r--Lib/pstats.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/pstats.py b/Lib/pstats.py
index a7b6dc9..9a22965 100644
--- a/Lib/pstats.py
+++ b/Lib/pstats.py
@@ -172,8 +172,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"),
@@ -181,6 +184,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):