Search code examples
pythondjangoprofilingdjango-debug-toolbar

Django profiling


I want to profile my Django App. My requirements are

1.inspection of sql queries

2.list of modules called for each request and their run time

3.Support for Ajax request

4.Web Page performance results like Yslow

5.Tracking vulnerabilities in the page

What is your Reccomendation?

UPDATE:

I Came across the following two snippets for django profiling

Interactive Profiling middleware

Django Debug Toolbar

Do anybody tell which one will be better suited for my needs?


Solution

  • 1 . Django Debug Toolbar

    Or in Django >= 1.3

    import logging
    l = logging.getLogger('django.db.backends')
    l.setLevel(logging.DEBUG)
    l.addHandler(logging.StreamHandler())
    

    2 . django-timelog or django-dowser

    3 . Firebug or Chrome dev tools

    4 . Page speed provides number of tools

    5 . nmap