Skip to main content

A Django middleware for interactive profiling

Project description

Geordi is a Django middleware that lets you interactively profile your site. Add ?__geordi__ to any URL, browse to it, and you’ll get a PDF showing the request’s call graph and the time spent in each call.

If you’ve set DEBUG = True in your Django settings, anyone can profile a page–even anonymous users. With DEBUG = False, only super users can profile pages.

If you’re running your Django site under a server like Gunicorn and you’ve configured time limits on requests, you can set GEORDI_CELERY = True to run the profiler in a background Celery task.

If you’re running multiple front-end servers and need PDFs to be saved to a shared directory, set GEORDI_OUTPUT_DIR. If it’s not set, the temporary directory provided by the system is used.

Installation

Before you get started, make sure you have GraphViz installed.

After you’ve done pip install geordi, add 'geordi' to the INSTALLED_APPS setting, and add 'geordi.VisorMiddleware' to the MIDDLEWARE_CLASSES setting. You’ll probably want to put it after Django’s authentication middleware and before everything else.

For background profiling with Celery, set GEORDI_CELERY = True.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
geordi-0.3.tar.gz (14.0 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page