cpython: f263a84871de (original) (raw)

--- a/Doc/library/profile.rst +++ b/Doc/library/profile.rst @@ -46,7 +46,8 @@ The Python standard library provides thr the profiler in some way, the task might be easier with this module. .. versionchanged:: 2.4

#. :mod:hotshot was an experimental C module that focused on minimizing the overhead of profiling, at the expense of longer data @@ -231,15 +232,16 @@ discussion of how to derive "better" pro reading the source code for these modules. -.. function:: run(command[, filename]) +.. function:: run(command[, filename][, sort]) This function takes a single argument that can be passed to the

@@ -250,18 +252,19 @@ reading the source code for these module 43/3 0.533 0.012 0.749 0.250 pobject.py:99(evaluate) ...

percall is the quotient of tottime divided by ncalls @@ -276,10 +279,12 @@ reading the source code for these module filename:lineno(function) provides the respective data of each function

.. function:: runctx(command, globals, locals[, filename]) @@ -300,19 +305,22 @@ Analysis of the profiler data is done us .. class:: Stats(filename, stream=sys.stdout[, ...])

@@ -330,15 +338,17 @@ The :class:Stats Class .. method:: Stats.strip_dirs()

.. method:: Stats.add(filename[, ...]) @@ -352,25 +362,27 @@ The :class:Stats Class .. method:: Stats.dump_stats(filename)

.. method:: Stats.sort_stats(key[, ...])

.. method:: Stats.reverse_order()

.. method:: Stats.print_stats([restriction, ...])

@@ -469,17 +496,19 @@ The :class:Stats Class non-parenthesized number repeats the cumulative time spent in the function at the right.

.. method:: Stats.print_callees([restriction, ...])

.. _profile-limits: @@ -580,32 +609,36 @@ you want to the :class:Profile class c The resulting profiler will then call :func:your_time_func. :class:profile.Profile

:class:cProfile.Profile

.. rubric:: Footnotes @@ -613,4 +646,3 @@ The resulting profiler will then call :f .. [#] Prior to Python 2.2, it was necessary to edit the profiler source code to embed the bias as a literal number. You still can, but that method is no longer described, because no longer needed. -