django-profiling-dashboard provides a dashboard with various profiling tools suitable for use in live servers.
- `yappi<http:https://code.google.com/p/yappi/>`_ for thread-aware live server profiling that can be enabled and disabled at run time;
- Pympler for memory debugging;
- `psutil<http:https://code.google.com/p/psutil/>`_ for system resource usage investigation.
Dashboard remplates are based on `Bootstrap<http:https://twitter.github.com/bootstrap/>`_ toolkit.
django-profiling-dashboard requires django >= 1.3 and python >= 2.6.
Make sure the requirements are installed:
pip install yappi pympler psutil
and install django-profiling-dashboard using pip:
pip install django-profiling-dashboard
Add
'profiling_dashboard'
toINSTALLED_APPS
;include 'profiling_dashboard.urls' in your urls.py:
urlpatterns = patterns('', # ... url(r'^profiling-dashboard/', include('profiling_dashboard.urls')), # ... )
visit /profiling-dashboard/
TODO
If there are several server processes then the profiler have to be started and stopped for each process, and the profiling stats will be different for different processes.
In some deployment schemas (e.g. apache proxied by nginx) there is no way to make sure subsequent requests will be handled by the same server process so take this in account while using django-profiling-dashboard.