Skip to main content
Help improve PyPI by participating in a 5-minute user interface survey!

Tools which help finding performance issues in Django projects

Project Description

Wheel Status Latest Version License

Goal

Provide tool which help finding performance issues in django projects.

Installation

Install requirements:

pip install -r requirements.txt

Install django-care:

pip install django-care

or current development version:

pip install hg+https:://bitbucket.org/kidosoft/django-care

Configuration

INSTALLED_APPS = (
    ...
    'care',
    ...
)

Usage

Checking for queries run at startup

Running command below will statistics about queries run at project startup.

$ python manage.py check_startup_queries -o queries.txt

Enabling SQL queries annotations

In order to get sql queries annotated with path and view in which it occured add middleware as below.

MIDDLEWARE_CLASSES += ('care.middleware.AnnotateSQLMiddleware',)

Issued queries will have comment appended in the form:

<original query> -- path: <request path> | view: <resolved view>

For example:

SELECT `id`, `username` FROM `auth_user` WHERE `id` = 1 -- path: / | view: base.index

It can help with searching for source of slow queries from slow.log.

Supported Django versions

Tested with:

  • Django 1.2.7 on python2.7
  • Django 1.3.7 on python2.7
  • Django 1.4.16 on python2.7
  • Django 1.5.11 on python2.7, python3.2, python3.3, python3.4
  • Django 1.6.8 on python2.7, python3.2, python3.3, python3.4
  • Django 1.7.1 on python2.7, python3.2, python3.3, python3.4

Release history Release notifications

This version
History Node

0.1.0

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
django_care-0.1.0-py2.py3-none-any.whl (12.2 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Dec 2, 2014
django-care-0.1.0.tar.gz (7.8 kB) Copy SHA256 hash SHA256 Source None Dec 2, 2014

Supported by

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