Yet Another Python Profiler
Project description

# Yappi
**Y**et **A**nother **P**ython **P**rof**i**ler, but this time support Multithread/CPU time profiling.
[](https://www.travis-ci.org/sumerc/yappi)





## Motivation
CPython standard distribution comes with three profilers. `cProfile`, `Profile` and `hotshot`.
`cProfile` is implemented as a C module based on `lsprof`, `Profile` is in pure Python and
`hotshot` can be seen as a small subset of a cProfile.
*The major issue is that all of these profilers lack support for multi-threaded programs and CPU time.*
If you want to profile a multi-threaded application, you must give an entry point to these profilers and then maybe merge
the outputs. None of these profilers are designed to work on long-running multi-threaded application.It is impossible to profile an application retrieve the statistics then stop and then start later on the fly (without affecting the profiled
application).
## Highlights
- Profiler can be started/stopped at any time from any thread in the application.
- Profile statistics can be obtained from any thread at any time.
- Profile statistics can show actual [CPU Time](http://en.wikipedia.org/wiki/CPU_time) used instead of Wall time.
- "Profiler pollution" (effect on the application run-time) is very minimal.
## Installation
Can be installed via PyPI
```
$ pip install yappi
```
OR from the source directly.
```
$ pip install git+https://github.com/sumerc/yappi#egg=yappi
```
## Documentation
- [Introduction](doc/introduction.md)
- [Clock Types](doc/clock_types.md)
- [API](doc/api.md)
- [THANKS](THANKS.md)
## Features
- Profiler results can be saved in [callgrind](http://valgrind.org/docs/manual/cl-format.html) or [pstat](http://docs.python.org/3.4/library/profile.html#pstats.Stats) 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](http://en.wikipedia.org/wiki/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.7.x
## Limitations:
* Threads must be derived from "threading" module's Thread object.
## Talks
- Python Performance Profiling: The Guts And The Glory
[](https://www.youtube.com/watch?v=BOKcZjI5zME)
## PyCharm Integration
Yappi is the default profiler in `PyCharm`. If you have Yappi installed, `PyCharm` will use it. See [the official](https://www.jetbrains.com/help/pycharm/profiler.html) documentation for more details.
# Yappi
**Y**et **A**nother **P**ython **P**rof**i**ler, but this time support Multithread/CPU time profiling.
[](https://www.travis-ci.org/sumerc/yappi)





## Motivation
CPython standard distribution comes with three profilers. `cProfile`, `Profile` and `hotshot`.
`cProfile` is implemented as a C module based on `lsprof`, `Profile` is in pure Python and
`hotshot` can be seen as a small subset of a cProfile.
*The major issue is that all of these profilers lack support for multi-threaded programs and CPU time.*
If you want to profile a multi-threaded application, you must give an entry point to these profilers and then maybe merge
the outputs. None of these profilers are designed to work on long-running multi-threaded application.It is impossible to profile an application retrieve the statistics then stop and then start later on the fly (without affecting the profiled
application).
## Highlights
- Profiler can be started/stopped at any time from any thread in the application.
- Profile statistics can be obtained from any thread at any time.
- Profile statistics can show actual [CPU Time](http://en.wikipedia.org/wiki/CPU_time) used instead of Wall time.
- "Profiler pollution" (effect on the application run-time) is very minimal.
## Installation
Can be installed via PyPI
```
$ pip install yappi
```
OR from the source directly.
```
$ pip install git+https://github.com/sumerc/yappi#egg=yappi
```
## Documentation
- [Introduction](doc/introduction.md)
- [Clock Types](doc/clock_types.md)
- [API](doc/api.md)
- [THANKS](THANKS.md)
## Features
- Profiler results can be saved in [callgrind](http://valgrind.org/docs/manual/cl-format.html) or [pstat](http://docs.python.org/3.4/library/profile.html#pstats.Stats) 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](http://en.wikipedia.org/wiki/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.7.x
## Limitations:
* Threads must be derived from "threading" module's Thread object.
## Talks
- Python Performance Profiling: The Guts And The Glory
[](https://www.youtube.com/watch?v=BOKcZjI5zME)
## PyCharm Integration
Yappi is the default profiler in `PyCharm`. If you have Yappi installed, `PyCharm` will use it. See [the official](https://www.jetbrains.com/help/pycharm/profiler.html) documentation for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yappi-1.0.tar.gz
(38.9 kB
view details)
File details
Details for the file yappi-1.0.tar.gz
.
File metadata
- Download URL: yappi-1.0.tar.gz
- Upload date:
- Size: 38.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/2.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f814131515d51db62b1a3468bcb84de30499124752806a5a6e11caf0b4344bf |
|
MD5 | a545101aa8a435b0780f06f4723f58c8 |
|
BLAKE2b-256 | d2927cd637a19fa2a10c0e55a44f8b36bcb83f0e1943ba8f1fb5edb15c819f2e |