Skip to main content

Django-plop

Django-plop is a middleware for profiling your views with PLOP, the Python Low Overhead Profiler.

Usage

Install it with pip (or easy_install, if that’s how you roll):

pip install django-plop

In your project settings:

MIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES + ('django-plop.middleware.PlopMiddleware',)

PLOP_DIR = os.path.join(PROJECT_ROOT, 'plop') # will be created, defaults to /tmp/plop

Then start your server with python manage.py --noreload (the --noreload is very important.) Hit a few pages, and then start the plop viewer like so:

python -m plop.viewer --datadir=plop

And navigate to localhost:8888 to view the profile results.

Note

--noreload is used in development to allow the signalling features PLOP uses. This means it sadly won’t work with some alternate runserver implementations such as django-devserver. It will, however, work in prefork environments like Gunicorn.

Production Usage

PLOP itself is used in production by Dropbox with 2% CPU overhead (or so). However, this middleware will write logs to the disk, which may not be acceptable for your use case (especially on Heroku and other PaaSes)

Non-goals

Django-plop won’t install tornado for you (you need it to use the plop visualizer.) This is because you can use it in production, and you may not want to have tornado kicking around in your production environment. If you you want to have it installed for you, install with the “viewer” extras:

pip install django-plop[viewer]

Metadata

Release files for django_plop 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django_plop 0.0.1
File Size Uploaded Provenance Actions
django_plop-0.0.1.tar.gz 2.5 kB Without provenance Details for django_plop-0.0.1.tar.gz

Release files / django_plop-0.0.1.tar.gz

Download URL django_plop-0.0.1.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
52f48d19355b4457d77da4159320ea4823efca2c50468eff8951cabf8223c3ed
BLAKE2b-256 checksum
How to use checksums
73c5f14ca0ca52760d1b009d81cbf55d475dc987cffc19464a20cb0e6ad6dd4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django_plop 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page