Greenlet-aware Python performance profiler, built on yappi.
William Pitcock 6bc2d1fa82 yappi: fix PyInit function on Python 3.x 2 years ago
_vendorized_yappi yappi: fix PyInit function on Python 3.x 2 years ago
doc Basic documentation. 5 years ago
examples Updated examples. 5 years ago
test Replace greenlet_profiler with GreenletProfiler in tests. 5 years ago
.gitignore Allow use of signals for starting/stopping of profiling 3 years ago
GreenletProfiler.py Allow use of signals for starting/stopping of profiling 3 years ago
LICENSE Switch from Apache to MIT License. 5 years ago
MANIFEST.in Include .h files in distribution. 5 years ago
README.rst Update README. 5 years ago
requirements.txt Depend on greenlet and yappi to build the docs. 5 years ago
setup.py Clarify which _yappi.so we’re using if yappi is also installed. 5 years ago

README.rst

================
GreenletProfiler
================

:Info: Greenlet-aware Python performance profiler, built on yappi.
:Author: A\. Jesse Jiryu Davis

Documentation: http://GreenletProfiler.readthedocs.org/

About
=====

A low-overhead deterministic performance profiler, similar to cProfile or
`Yappi`_, which understands greenlet context-switches. Suitable for
profiling Gevent-based applications.

.. _Yappi: https://code.google.com/p/yappi/

Dependencies
============

* Python 2.6, 2.7, or 3.2 or later.
* `Greenlet`_.

.. _Greenlet: http://greenlet.readthedocs.org

Example
=======

.. code-block:: python

GreenletProfiler.set_clock_type('cpu')
GreenletProfiler.start()
my_function()
GreenletProfiler.stop()
stats = GreenletProfiler.get_func_stats()
stats.print_all()
stats.save('profile.callgrind', type='callgrind')