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.

Source Distribution

django-view-timer-0.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

django-view-timer-0.2.macosx-10.10-intel.exe (68.5 kB view details)

Uploaded Source

File details

Details for the file django-view-timer-0.2.tar.gz.

File metadata

File hashes

Hashes for django-view-timer-0.2.tar.gz
Algorithm Hash digest
SHA256 f1ab5f7e0639dc6a773347fe1461e67363f59ba56eba4153711afdcd4c1d97db
MD5 f1a573d95052ad164e4ddd40ad174ae5
BLAKE2b-256 df75879102eb913bb1fb5cc3455011d73a7081b23535285380c2e26d7794b17f

See more details on using hashes here.

File details

Details for the file django-view-timer-0.2.macosx-10.10-intel.exe.

File metadata

File hashes

Hashes for django-view-timer-0.2.macosx-10.10-intel.exe
Algorithm Hash digest
SHA256 daee10191c3b0c53143029dc89d2eaf67b4ee84b1ecc4ba9840f7855e36ec475
MD5 2163ae6e1f920cbce47ae85b64926975
BLAKE2b-256 2d079b53444cf89a785812fd41013c3dba08678e6ef4bc6c0cf1fb8b212b5e4d

See more details on using hashes here.

Supported by

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