]> granicus.if.org Git - python/commitdiff
Issue #14900: Add aliases for sorting params for pstat to follow column names from...
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Sun, 7 Oct 2012 16:17:15 +0000 (19:17 +0300)
committerAndrew Svetlov <andrew.svetlov@gmail.com>
Sun, 7 Oct 2012 16:17:15 +0000 (19:17 +0300)
Patch by Arne Babenhauserheide.

Lib/pstats.py

index a7b6dc91e2a1e3bfc40b15c0bbe931bb7b7e237b..9a22965b7a104ddb76c3cac63b2b5f37cebaff05 100644 (file)
@@ -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):