Skip to main content

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


Download files

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

Source Distribution

django-perftools-0.7.0.tar.gz (4.3 kB view details)

Uploaded Source

File details

Details for the file django-perftools-0.7.0.tar.gz.

File metadata

File hashes

Hashes for django-perftools-0.7.0.tar.gz
Algorithm Hash digest
SHA256 9035ac935d97e439310630595d0b7f2958c144cad06b85ab9e4ff7eed6a6c352
MD5 bfa73805e50555029a083446f532b857
BLAKE2b-256 318f9216eb39ed8af014c546dc6cb743017ae732fad095e2529fcd8777321a33

See more details on using hashes here.

Provenance

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