Yet Another Python Profiler
Project description
Motivation:
CPython standart distribution is coming with three profilers. cProfile, Profile and hotshot. cProfile module is implemented as a C module based on lsprof, Profile is in pure Python and the hotshot can be seen as a small subset of a cProfile. The motivation to implement a new profiler is that all of these profilers lacks the support of multi-threaded programs. 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 is designed to work on long-running multi-threaded application. While implementing a game server, it turns out that is is impossible to profile an application retrieve the statistics then stop and then start later on on the fly(without affecting the profiled application). With the experience of implementing a game server in Python, we have identified most of the problems, tricky parts regarding profiler usage and so, we have come up with simple but powerful requirements.
Requirements:
Profiler should be started/stopped at any time from any thread in the application.
Profile statistics should be obtained from any thread at any time.
Profile events themselves should work theoretically in O(1) time and O(n+m) space(where m is recursion count) per any profile event. This means: application behavior/details/size should not affect the profiler run-time.
“Profiler pollution”(effect on the application run-time) should be very minimal and observable via statistics to see how much load the profiler is putting on the application. Best way to compute this pollution is to compute the percentage of total run time spent in profiler to the total application run-time.(these statistics shall also include space requirements per application)
Profiler shall handle the error/exception situations internally. For example running out of memory should be handled by the profiler itself. No OS/Python VM exception that occurred inside profiler shall not affect the profiled application.
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 Distributions
File details
Details for the file yappi-0.54.zip
.
File metadata
- Download URL: yappi-0.54.zip
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bb77b58ae693aa21628c89ab202765a37460e11f888af48ccc83c1336833afc |
|
MD5 | c4c75f1f9aa14536d7eab778dab69973 |
|
BLAKE2b-256 | d7435121fb647d236b95aa31097dc930ca8742e841e3a05fa7978e2013c01f3d |
File details
Details for the file yappi-0.54.tar.gz
.
File metadata
- Download URL: yappi-0.54.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d680a2783fed58a5992fcf79dacb91a1c2c603621616da980099bd416e6fadc8 |
|
MD5 | 740f3f1533e33cafa21a889656db4970 |
|
BLAKE2b-256 | 68cd4c81603ef5f27416643eac7d16e29e978c2d59c1dddd23044021885cd69c |