Developer-friendly performance profiling utilities for Python
Project description
WhySlow?
Developer-friendly performance profiling utilities for Python
WhySlow
simplifies the usage of cProfile
and snakeviz
. It offers the fastes way to get from slow code to flame chart and start the performance optimization adventure.
Installation
pip install whyslow
Usage
There are three ways to use this profiler.
As decorator to profile a function call
from whyslow import profile
@profile
def my_slow_function():
# do expensive operations
As context manager to profile any code
from whyslow import profile
with profile():
# some expensive operations
As module to profile a script
$ python -m whyslow my-slow-script.py
License
MIT License
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
whyslow-0.1.tar.gz
(3.8 kB
view hashes)
Built Distribution
whyslow-0.1-py3-none-any.whl
(4.7 kB
view hashes)