=============================
Django Eraserhead
=============================
.. image:: https://badge.fury.io/py/django-eraserhead.svg
:target: https://badge.fury.io/py/django-eraserhead
.. image:: https://travis-ci.org/dizballanze/django-eraserhead.svg?branch=master
:target: https://travis-ci.org/dizballanze/django-eraserhead
.. image:: https://codecov.io/gh/dizballanze/django-eraserhead/branch/master/graph/badge.svg
:target: https://codecov.io/gh/dizballanze/django-eraserhead
Provide hints to optimize database usage by deferring unused fields
.. image:: https://github.com/dizballanze/django-eraserhead/raw/master/eraserhead.jpg
*WARNING* use this package only in dev environment!
Documentation
-------------
Requirements
-----------
* Django 1.9+
* Python 2.7, 3.4+
Quickstart
----------
Install Django Eraserhead::
pip install django-eraserhead
Add it to your `INSTALLED_APPS`:
.. code-block:: python
INSTALLED_APPS = (
...
'eraserhead.apps.EraserheadConfig',
...
)
ERASERHEAD_ENABLED = True
ERASERHEAD_TRACEBACK_BASE_PATH = BASE_DIR
Settings:
* `ERASERHEAD_ENABLED` - enable/disable Django Eraserhead
* `ERASERHEAD_TRACEBACK_BASE_PATH` - set base path to filter tracebacks. Set to `None` to display full traceback.
Features
--------
.. image:: https://github.com/dizballanze/django-eraserhead/raw/master/screenshot.png
Django Eraserhead monitors:
* querysets/models fields usage (used and unused fields) with considering deferred fields
* count of instances created for each queryset
* corresponding model of each queryset
* traceback for each queryset to easily find corresponding code
* calculate memory consumption of unused fields
Based on fields usage Django Eraserhead suggests optimizations for each queryset.
TODO
-----
* decorator and/or context processor for partial stats collecting
* detect deferred fields loading
* auto deferring fields based on usage
* display deferred fields
Running Tests
-------------
::
source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox
Credits
-------
Tools used in rendering this package:
* Cookiecutter_
* `cookiecutter-djangopackage`_
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage
Django Eraserhead
=============================
.. image:: https://badge.fury.io/py/django-eraserhead.svg
:target: https://badge.fury.io/py/django-eraserhead
.. image:: https://travis-ci.org/dizballanze/django-eraserhead.svg?branch=master
:target: https://travis-ci.org/dizballanze/django-eraserhead
.. image:: https://codecov.io/gh/dizballanze/django-eraserhead/branch/master/graph/badge.svg
:target: https://codecov.io/gh/dizballanze/django-eraserhead
Provide hints to optimize database usage by deferring unused fields
.. image:: https://github.com/dizballanze/django-eraserhead/raw/master/eraserhead.jpg
*WARNING* use this package only in dev environment!
Documentation
-------------
Requirements
-----------
* Django 1.9+
* Python 2.7, 3.4+
Quickstart
----------
Install Django Eraserhead::
pip install django-eraserhead
Add it to your `INSTALLED_APPS`:
.. code-block:: python
INSTALLED_APPS = (
...
'eraserhead.apps.EraserheadConfig',
...
)
ERASERHEAD_ENABLED = True
ERASERHEAD_TRACEBACK_BASE_PATH = BASE_DIR
Settings:
* `ERASERHEAD_ENABLED` - enable/disable Django Eraserhead
* `ERASERHEAD_TRACEBACK_BASE_PATH` - set base path to filter tracebacks. Set to `None` to display full traceback.
Features
--------
.. image:: https://github.com/dizballanze/django-eraserhead/raw/master/screenshot.png
Django Eraserhead monitors:
* querysets/models fields usage (used and unused fields) with considering deferred fields
* count of instances created for each queryset
* corresponding model of each queryset
* traceback for each queryset to easily find corresponding code
* calculate memory consumption of unused fields
Based on fields usage Django Eraserhead suggests optimizations for each queryset.
TODO
-----
* decorator and/or context processor for partial stats collecting
* detect deferred fields loading
* auto deferring fields based on usage
* display deferred fields
Running Tests
-------------
::
source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox
Credits
-------
Tools used in rendering this package:
* Cookiecutter_
* `cookiecutter-djangopackage`_
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage
Metadata
Release files for django-eraserhead 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-eraserhead-0.1.5.tar.gz | 6.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_eraserhead-0.1.5-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 13.9 kB
Release files / django-eraserhead-0.1.5.tar.gz
| Download URL | django-eraserhead-0.1.5.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e936aaedfb54b6a200106aa0ac5380a73d3a9a3683d3d0d593082a1bdec6477e
|
|
BLAKE2b-256 checksum How to use checksums |
72b7a61f3b631c451b32c4f65d059d818885a33adf57135e907701cbe3de28ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_eraserhead-0.1.5-py2.py3-none-any.whl
| Download URL | django_eraserhead-0.1.5-py2.py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
3b3fca02433526e8e4244bda785eeddbdda9945f335ceae42bf8a1a90701ccff
|
|
BLAKE2b-256 checksum How to use checksums |
f1886646e6fe248283a74ad94f76336104f73503aa65ca1ec3556bd0dcdf4b0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |