Skip to main content

WSGI Middleware version of the CherryPy memory leak debugger

Project description

Dozer

https://travis-ci.org/mgedmin/dozer.svg?branch=master https://ci.appveyor.com/api/projects/status/github/mgedmin/dozer?branch=master&svg=true https://coveralls.io/repos/mgedmin/dozer/badge.svg?branch=master

Dozer was originally a WSGI middleware version of Robert Brewer’s Dowser CherryPy tool that displays information as collected by the gc module to assist in tracking down memory leaks. It now also has middleware for profiling and for looking at logged messages.

Tracking down memory leaks

Usage:

from dozer import Dozer

# my_wsgi_app is a WSGI application
wsgi_app = Dozer(my_wsgi_app)

Assuming you’re serving your application on the localhost at port 5000, you can then load up http://localhost:5000/_dozer/index to view the gc info.

Profiling requests

Usage:

from dozer import Profiler

# my_wsgi_app is a WSGI application
wsgi_app = Profiler(my_wsgi_app)

Assuming you’re serving your application on the localhost at port 5000, you can then load up http://localhost:5000/_profiler to view the list of recorded request profiles.

Here’s a blog post by Marius Gedminas that contains a longer description of Dozer’s profiler.

Inspecting log messages

Usage:

from dozer import Logview

# my_wsgi_app is a WSGI application
wsgi_app = Logview(my_wsgi_app)

Every text/html page served by your application will get some HTML and Javascript injected into the response body listing all logging messages produced by the thread that generated this response.

Here’s a blog post by Marius Gedminas that contains a longer description of Dozer’s logview.

Dozer Changelog

0.7 (April 23, 2019)

  • Add support for Python 3.7.

  • Drop support for Python 3.3 and 3.4.

  • Stop using cgi.escape on Python 3, which is especially important now that it’s been removed from Python 3.8.

0.6 (May 18, 2017)

  • Add support for Python 3.6.

  • Drop support for Python 2.6.

  • Fix rare TypeError when listing profiles, if two profiles happen to have the exact same timestamp (https://github.com/mgedmin/dozer/pull/4).

0.5 (December 2, 2015)

  • Make /_dozer show the index page (instead of an internal server error).

  • Add support for Python 3.4 and 3.5.

  • Drop support for Python 2.5.

  • Move to GitHub.

0.4 (March 21, 2013)

  • 100% test coverage.

  • Add support for Python 3.2 or newer.

  • Drop dependency on Paste.

0.3.2 (February 10, 2013)

0.3.1 (February 6, 2013)

0.3 (December 13, 2012)

  • Emit the “PIL is not installed” only if the Dozer middleware is actually used.

  • Give a name to the Dozer memleak thread.

  • You can now supply a function directly to Logview(stack_formatter=fn)

  • New configuration option for Logview middleware: tb_formatter, similar to stack_formatter, but for exception tracebacks.

0.2 (December 5, 2012)

  • Adding logview that appends log events for the current request to the bottom of the html output for html requests.

  • Adding profiler for request profiling and call tree viewing.

  • Refactored Dozer into its own leak package.

  • New maintainer: Marius Gedminas.

0.1 (June 14, 2008)

  • Initial public release, port from Dowser, a CherryPy tool.

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

Dozer-0.7.tar.gz (85.0 kB view details)

Uploaded Source

Built Distribution

Dozer-0.7-py2.py3-none-any.whl (89.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file Dozer-0.7.tar.gz.

File metadata

  • Download URL: Dozer-0.7.tar.gz
  • Upload date:
  • Size: 85.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for Dozer-0.7.tar.gz
Algorithm Hash digest
SHA256 7a5695fb2531de4961dac6759a256fb3b79370545cf0b247271ae31e84ce9c05
MD5 7343951b6c3c7f5ff56b7afdb2d248a1
BLAKE2b-256 a08ce425442634faabf840c24d5ba0188d38db1151c2566ff86066857b900f7f

See more details on using hashes here.

File details

Details for the file Dozer-0.7-py2.py3-none-any.whl.

File metadata

  • Download URL: Dozer-0.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 89.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for Dozer-0.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 07f117a13386e5ac194676e18be1bd4af40f6f3c8899a9d6cb1804b8954716b9
MD5 894da9bb634c83dec660f824881d4a44
BLAKE2b-256 f85f9335a6598f01632ec37306d2a419f830fcd73738145d031c4948183fe1bc

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