Skip to main content

Tools for profiling of code and Django queries

Project description

django-profiler

Useful tool to profile code and Django queries.

Example

from django_profiler.profile import Profiler

with Profiler(name='my-profiler'):
    print("Hello World!")

Output:

Hello World!

Profiler: my-profiler

Number of Queries : 0
Finished in : 0.00s
         2 function calls in 0.000 seconds

   Ordered by: cumulative time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000    0.000    0.000 profiling.py:45(__exit__)
        1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}

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

sp-django-profiler-1.0.0.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

sp_django_profiler-1.0.0-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

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