Skip to main content

Django View Timer

Project description

django-view-timer

Profile execution time for django views

https://img.shields.io/pypi/v/django-view-timer.svg

Settings

None of the following settings are mandatory


DJANGO_VIEW_TIMER_ENABLED

Enable/Disable profiler

Default value: True


DJANGO_VIEW_TIMER_MIN_THRESHOLD

Disregards execution time below threshold (in milliseconds)

Default value: 20


DJANGO_VIEW_TIMER_WARNING_LEVEL

Set number of milliseconds for warnings

Default value: 300


DJANGO_VIEW_TIMER_LOG_FORMAT

Log Format

Default Value:

"View: {view}\tModule: {module}\tFunction: {function}\tExecution Time: {time} msecs"

Screenshot

https://raw.githubusercontent.com/aledista/django-view-timer/master/screenshot.png

Installation

Install using pip

pip install django_view_timer

in urls.py import

from django_view_timer.urls import (
   patterns as dvt_patterns,
   url as dvt_url
)

urlpatterns = patterns('',
   url(r'^$', index, name='index'),
)

dvt_urlpatterns = dvt_patterns('',
   dvt_url(r'dvt_fun_base_str$', 'djangoproject.views.fun_base_test_view', name='dvt_fb_str_view'),
   dvt_url(r'dvt_fun_base$', fun_base_test_view, name='dvt_fb_view'),
   dvt_url(r'dvt_class_base$', ClassBaseTestView.as_view(), name='dvt_cb_view'),
)

urlpatterns += dvt_urlpatterns

Project details


Download files

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

Files for django-view-timer, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size django-view-timer-0.2.macosx-10.10-intel.exe (68.5 kB) File type Windows Installer Python version any Upload date Hashes View hashes
Filename, size django-view-timer-0.2.tar.gz (3.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

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