Integrate snakeviz profile visualization into django
Project description
Django Snakeviz Profiling
Django Snakeviz Profiling integrates snakeviz along with a db query display into a django middleware that can show results inline in your application.
No migrations are required nor do any extra url routes need to be added to your application, only requiring to install one piece of middleware.
Table of Contents
Installation
pip install django-snakeviz-profiling
In your settings file, add the following middleware as close to the top as possible to cover as much code as possible:
MIDDLEWARE = [
"django_snakeviz_profiling.SnakevizProfilingMiddleware",
...
]
Add django_snakeviz_profiling to your installed apps:
INSTALLED_APPS = [
...
"django_snakeviz_profiling",
]
Finally, add the following config setting:
SNAKEVIZ_PROFILING = "PLEASE_PROFILE_REQUESTS"
Usage
On any request, add the following GET parameter to your url:
SNAKEVIZ_PROFILING=PLEASE_PROFILE_REQUESTS
, and instead of the regular page, you will be presented with a profile output from the request.
Note that if django_snakeviz_profiling is used, individual requests will be dramatically slower,
so be careful using this in prod!
License
django-snakeviz-profiling is distributed under the terms of the MIT license.
Parts of the code comes from the Snakeviz Project under
the BSD 3-Clause license, and is specifically identified as such.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_snakeviz_profiling-0.1.0.tar.gz.
File metadata
- Download URL: django_snakeviz_profiling-0.1.0.tar.gz
- Upload date:
- Size: 270.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.24.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f24459a139591636806af510cafdbcf7e36d721b599d5e724cb42a94f3316dc4
|
|
| MD5 |
17c25633b6ad8fd81033ca9518269086
|
|
| BLAKE2b-256 |
e6450eedaea10517f7e8d201e5b3e0b7ca5e059c452d33d16a415c926ee2aa4f
|
File details
Details for the file django_snakeviz_profiling-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_snakeviz_profiling-0.1.0-py3-none-any.whl
- Upload date:
- Size: 280.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.24.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd511d631a9e7e4dbd1ee6215a7d06bf6af130d31d4be0e5cc31568479eca988
|
|
| MD5 |
0db7d762cd9f1ae0465029a40dc69e44
|
|
| BLAKE2b-256 |
e8b7794f1e862350a44b337b2b43d3612e4181f5173abfc3275f1b57ab8ccd9a
|