Skip to main content

django-web-profiler’s documentation:

Documentation Status https://travis-ci.org/MicroPyramid/django-web-profiler.svg?branch=master Downloads Latest Release https://coveralls.io/repos/github/MicroPyramid/django-web-profiler/badge.svg?branch=master Code Health Latest Release

Introduction:

django-web-profiler is a django profiling tool which logs, stores debug toolbar statistics and also a set of URL’s statistics using a management command. It logs request values such as device, ip address, user cpu time, system cpu time, No of queries, sql time, no of cache calls, missing, setting data cache calls for a particular url.

It provides a basic UI, which will differentiate development url statistics, production level statistics which generates using a management command.

Source Code is available in Micropyramid Repository(https://github.com/MicroPyramid/django-web-profiler).

Modules used:

  • Python >= 2.6 (or Python 3.4)

  • Django = 1.11.2

  • Django Compressor = 2.1.1

  • Django Debug Toolbar = 1.8

  • requests = 2.17.3

  • JQuery >= 1.7

Installation Procedure

  1. Install django-web-packer using the following command:

    pip install django-web-profiler
    
            (or)
    
    git clone git://github.com/micropyramid/django-web-profiler.git
    
    cd django-web-profiler
    
    python setup.py install
  2. Add app name in settings.py:

    INSTALLED_APPS = [
       '..................',
       'compressor',
       'debug_toolbar',
       'django_web_profiler',
       '..................'
    ]
  3. Add ‘django_web_profiler.middleware.DebugLoggingMiddleware’ to your project middlewares:

    MIDDLEWARE = [
       '.....................................................',
       'django_web_profiler.middleware.DebugLoggingMiddleware',
       '.....................................................',
    ]
    
    Disable 'debug_toolbar.middleware.DebugToolbarMiddleware' if you've already using it.
  4. Make sure that ‘debug-toolbar’ has enabled for your application. After installing debug toolbar, add the following details to settings.py:

    INTERNAL_IPS = ('127.0.0.1',)
  5. After installing/cloning, add the following details in settings file about urls, logger names:

    URLS = ['http://stage.testsite.com/', 'http://stage.testsite.com/testing/']
  6. Add the following logger to your existing loggers and create a folder called ‘logs’ where all profiler log files are stored:

        'request-logging': {
            'level': 'DEBUG',
            'handlers': ['console', 'file_log'],
            'propagate': False,
        },
    
    Here file_log is a handler which contains a path where log files are stored.

Sample Application

  1. Install application requirements using the following command:

    pip install -r requirements.txt
  2. Load the application load using the following command:

    python sandbox/manage.py loaddata sandbox/fixtures/users.json
  3. Using the following command, we can generate url statistics in production environment i.e debug=False:

    python sandbox/manage.py logging_urls

We are always looking to help you customize the whole or part of the code as you like.

Visit our Django Development page Here

We welcome your feedback and support, raise github ticket if you want to report a bug. Need new features? Contact us here

or

mailto:: “hello@micropyramid.com

Download files

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

Source Distribution

django-web-profiler-0.1.3.tar.gz (77.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_web_profiler-0.1.3-py3-none-any.whl (87.9 kB view details)

Uploaded Python 3

File details

Details for the file django-web-profiler-0.1.3.tar.gz.

File metadata

File hashes

Hashes for django-web-profiler-0.1.3.tar.gz
Algorithm Hash digest
SHA256 01138b66ac35be58a119876a6f684e8a81619e2c072634162128b1e21eeea9c7
MD5 f9f9d7d560aeb5ca81cb14a6a28c7d4c
BLAKE2b-256 b59b8c95aca4ed65f5c29ceafac7f9c6d717dbb57959aa70895d785a604c8f7d

See more details on using hashes here.

File details

Details for the file django_web_profiler-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_web_profiler-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dad2442458d3f2401eae60ba3ea9b3bb34dede510170c29fc8d9135a10886e17
MD5 be95e9c727c30a9b54062a62b8760ede
BLAKE2b-256 03d178b041ab958031b8edbce2fed7c60679febedc28742c7bf9a7ec0996327b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page