UNKNOWN
Project description
Logging Slow Requests
Perftools includes a logger that will monitor requests execution time. Once it hits the defined threshold, it will log to the named perftools logger, including the metadata for the request (as defined by Sentry’s logging spec).
from perftools.middleware.slowreq import SlowRequestLoggingMiddleware app = SlowRequestLoggingMiddleware(app, threshold=100) # in ms
Remote Profiling
Profiles a request and saves the results to disk.
from perftools.middleware.remoteprof import RemoteProfilingMiddleware app = RemoteProfilingMiddleware(app, outpath='/var/data/cprofile-results/', percent=10) # 10% of requests
Query Counts
Logs requests which exceed a maximum number of queries.
from perftools.middleware.querycount import QueryCountLoggingMiddleware app = QueryCountLoggingMiddleware(app, threshold=100) # number of queries
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
File details
Details for the file django-perftools-0.6.1.tar.gz
.
File metadata
- Download URL: django-perftools-0.6.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60593cac8ce22399ea58c30cc4498f02c6016435c32482dffd8002840ee7ada4 |
|
MD5 | 60a0198ba26ad71d8a9b577fba09c967 |
|
BLAKE2b-256 | 47af01b0cc1500240868efb4708a289de356519d77d16f3211316ec45737ff45 |