Skip to main content

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


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.1.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

whyslow-0.1.1-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page