[Python-checkins] cpython (merge 3.3 -> default): Merge issue #14900: Add aliases for sorting params for pstat to follow column

andrew.svetlov python-checkins at python.org
Sun Oct 7 18:23:08 CEST 2012


http://hg.python.org/cpython/rev/7b8b1b30e5f8
changeset:   79579:7b8b1b30e5f8
parent:      79573:bc658b6a1d4e
parent:      79578:29d4ac311627
user:        Andrew Svetlov <andrew.svetlov at gmail.com>
date:        Sun Oct 07 19:19:34 2012 +0300
summary:
  Merge issue #14900: Add aliases for sorting params for pstat to follow column names from pstat output.

Patch by Arne Babenhauserheide.

files:
  Lib/pstats.py |  4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)


diff --git a/Lib/pstats.py b/Lib/pstats.py
--- a/Lib/pstats.py
+++ b/Lib/pstats.py
@@ -159,8 +159,11 @@
     # 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 @@
               "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):

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list