Flamegraphs for Django Debug Toolbar
Perl Python Makefile HTML
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
djdt_flamegraph
example
tests
.gitignore
.travis.yml
HISTORY.rst
LICENSE
MANIFEST.in
Makefile
README.rst
fireman.png
flamegraph-screenshot.png
requirements.txt
setup.cfg
setup.py
tox.ini

README.rst

DjDT Flame Graph

https://raw.githubusercontent.com/23andMe/djdt-flamegraph/master/fireman.png

Get a flame graph of the current request, right in Django.

https://travis-ci.org/23andMe/djdt-flamegraph.svg?branch=master

Screenshot

https://raw.githubusercontent.com/23andMe/djdt-flamegraph/master/flamegraph-screenshot.png

Features

Install

  • Add djdt_flamegraph to your requirements.txt.
  • Add djdt_flamegraph.FlamegraphPanel to DEBUG_TOOLBAR_PANELS.
  • Run your server with python manage.py runserver --nothreading --noreload

Notes

  • ValueError at /: signal only works in main thread: Flame graphs can only be generated in a single threaded server.
  • Flame graphs are disabled by default. You'll have to enable it by clicking the checkbox next to it in the Debug Toolbar.
  • Probably won't work on Windows.

Development

This panel comes with an example Django app to test with. Just run make example and the server should start running.