Skip to main content

Provides a break down of page loading time

Project description

django-speedbar instruments key events in the page loading process (database queries, template rendering, url resolution, etc) and provides summary information for each page load, as well as integration with Google Chrome SpeedTracer to show a tree of the events taking place in a page load.

It is designed to be run on live sites, with minimal performance impact. Although all requests are monitored, results are only visible for users with the staff flag.


To install django-speedbar add it to your installed apps, urls, and add the speedbar middleware.


     # ...
     # ...

 # For best results put speedbar as near to the top of your middleware
 # list as possible. django-speedbar listens to the django request_finished
 # signal so actions performed by middleware higher up the stack will still
 # be recorded, but will not be included in summary data.
     # ...

urlpatterns = patterns('',
    # ...
    (r'^speedbar/', include('speedbar.urls')),
    # ...

To view the results in SpeedTracer you will also need to install the SpeedTracer plugin.

To include summary information in the page you can use the metric template tag.

{% load speedbar %}
<div class="speedbar">
    <span>Overall: {% metric "overall" "time" %} ms</span>
    <span>SQL: {% metric "sql" "count" %} ({% metric "sql" "time" %} ms)</span>
    <!-- ... -->


django-speedbar has a number of configuration settings.

# Enable instrumentation of page load process

# Enable the summary data template tags

# Include headers needed to show page generation profile tree in the
# Google Chrome SpeedTracer plugin.

# Include response headers with summary data for each request. These are
# intended for logging and are included in all requests, not just staff
# requests. If you turn this on we recommend configuring your load
# balancer to strip them before sending the response to the client.

# Configure which instrumentation modules to load. This should not
# normally be necessary for built in modules as they will only load
# if the relevant clients are installed, but is useful for adding
# additional custom modules.
    'speedbar.modules.stacktracer', # Most other modules depend on this one
    # ...


We run our production systems with django-speedbar installed. However, the API is not stable and is likely to change. It does not yet have any default templates to make it easier to use the on-page features.

Similar projects

There are a number of similar projects you may want to consider as well as or instead of django-speedbar.



The swiss army knife of django page inspection. Mature, widely used, and with lots of plugins available. It has more of a focus on debugging and information, and less focus on performance measurement. We found it too slow to run on our sites in production.

New Relic


An in depth application monitoring platform. Very useful for observing trends in application performance and page load times. Less useful for drilling deep into individual page loads, and has support for a smaller set of external services. Commercial product.



Site wide profiler for django applications. I haven’t used this, so cannot comment on it.


django-speedbar was primarily written by Theo Spears whilst working at Mixcloud.

Project details

Download files

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

Files for django-speedbar, version 0.2.2
Filename, size File type Python version Upload date Hashes
Filename, size django_speedbar-0.2.2-py2-none-any.whl (23.3 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size django-speedbar-0.2.2.tar.gz (14.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page