yappi


Yet Another Python Profiler, but this time support Multithread/CPU time profiling

Features (v0.94)

  • Ability to analyze per-thread information. (new in 0.94)
  • Ability to hook underlying threading model events/properties. (new in 0.92)
  • Decorator to profile individual functions easily. (new in 0.92)
  • Profiler results can be saved in callgrind and pstat formats. (new in 0.82)
  • Profiler results can be merged from different sessions on-the-fly. (new in 0.82)
  • Profiler results can be easily converted to pstats. (new in 0.82)
  • Profiling of multithreaded Python applications transparently.
  • Supports profiling per-thread CPU time(new in 0.62)
  • Profiler can be started from any thread at any time.
  • Ability to get statistics at any time without even stopping the profiler.
  • Various flags to arrange/sort profiler results.
  • Supports Python 2.6.x <= x <= Python 3.4

Installation

Can be installed via easy_install yappi , pip install yappi or from the source directly.

Documentation:

Please see API reference manual. For how to use the profiler and how to interpret statistics output, see usage reference manual. And finally, see requirements and techinal section for why we have implemented yet another python profiler and some technical info about the internals.

Download

Latest development release from http://bitbucket.org/sumerc/yappi/downloads or the latest official version from PyPI http://pypi.python.org/pypi/yappi/ can be downloaded directly.

Development

Latest development sources can be found http://bitbucket.org/sumerc/yappi/.

A Simple Example:

```

import yappi def foo(): for i in range(10000000): pass yappi.start() foo() yappi.get_func_stats().print_all() ''' Clock type: cpu Ordered by: totaltime, desc

name #n tsub ttot tavg :1 2/1 0.000000 0.296402 0.148201 :1 foo 1 0.296402 0.296402 0.296402 ..b\encodings\cp437.py:14 Codec.decode 2 0.000000 0.000000 0.000000 ''' ```

Project Information

Labels:
python profile profiler yappi trace measure runtime multithread multithreaded cputime cpuusage Application