Developer-friendly performance profiling utility for Python
WhySlow
simplifies the usage of cProfile and snakeviz. It offers the fastest way to get from slow code to flame chart and start the performance optimization investigations.
pip install whyslow
There are three ways to use this profiler.
from whyslow import profile
@profile()
def my_slow_function():
# do expensive operations
from whyslow import profile
with profile():
# some expensive operations
$ python -m whyslow my-slow-script.py
MIT License