Skip to content

Commit

Permalink
Merge pull request #6 from icemac/master
Browse files Browse the repository at this point in the history
Fix ReST.
  • Loading branch information
tseaver committed Mar 21, 2017
2 parents b5fe573 + 0882779 commit b4cfb51
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,15 @@ Profiling individual functions
Sometimes it might be needed to profile a specific function, be it for
analyzing a bottleneck found with the full profiling, or to compare different
approaches to the same problem. This package provides a decorator for this
case. To use it, simply decorate the desired function like this::
case. To use it, simply decorate the desired function like this:

.. code-block:: python
from repoze.profile.decorator import profile
from repoze.profile.decorator import profile
@profile('Descriptive title', sort_columns=('time', 'cumtime'), lines=30)
my_bottleneck()
# some really time consuming code
...
@profile('Descriptive title', sort_columns=('time', 'cumtime'), lines=30)
def my_bottleneck():
# some really time consuming code
The results of the profiling will be sent to standard out. The ``title`` will
Expand Down

0 comments on commit b4cfb51

Please sign in to comment.