xarg / dozer

WSGI middleware for profiling CPU/memory and inspecting logs

Home Page:https://pypi.python.org/pypi/Dozer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

WSGI middleware for profiling CPU/memory and inspecting logs

https://pypi.python.org/pypi/Dozer

License:Other


Languages

Language:Python 44.1%Language:JavaScript 38.1%Language:Mako 7.3%Language:CSS 7.2%Language:Makefile 2.0%Language:HTML 1.3%