Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c3e5b10

Browse files
committed
Issue #14900: Add aliases for sorting params for pstat to follow column names from pstat output.
Patch by Arne Babenhauserheide.
1 parent 2ef4584 commit c3e5b10

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Lib/pstats.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,19 @@ def dump_stats(self, filename):
159159
# along with some printable description
160160
sort_arg_dict_default = {
161161
"calls" : (((1,-1), ), "call count"),
162+
"ncalls" : (((1,-1), ), "call count"),
163+
"cumtime" : (((3,-1), ), "cumulative time"),
162164
"cumulative": (((3,-1), ), "cumulative time"),
163165
"file" : (((4, 1), ), "file name"),
166+
"filename" : (((4, 1), ), "file name"),
164167
"line" : (((5, 1), ), "line number"),
165168
"module" : (((4, 1), ), "file name"),
166169
"name" : (((6, 1), ), "function name"),
167170
"nfl" : (((6, 1),(4, 1),(5, 1),), "name/file/line"),
168171
"pcalls" : (((0,-1), ), "primitive call count"),
169172
"stdname" : (((7, 1), ), "standard name"),
170173
"time" : (((2,-1), ), "internal time"),
174+
"tottime" : (((2,-1), ), "internal time"),
171175
}
172176

173177
def get_sort_arg_defs(self):

0 commit comments

Comments
 (0)