I'm currently using this on a few of my projects, and decided to throw
it up on bitbucket for others who might want to use it (and tell me
areas I need to work on). It's pretty solid, again I'm using it
already where I work, and it's got a pretty decent web based reporting
and control interface. Detailed feature list is on the wiki, epydocs
are in the package on bitbucket, and all it takes is decorating a
function/method/generator/class to start profiling. If you want WSGI
data, just add two lines (including the import) to insert the wsgi
middleware. (in fact, I pasted what I'm using at the bottom of the
email, for gunicorn)

Description from the readme:
"A thread and greenthread aware profiling module that relies on
decorators to indicate what areas of code to profile. If profiling
WSGI applications, provides a middleware component to allow for
capturing request path of profiling data. Also contains a (somewhat
minimal) UI for presenting the data, and exposes reporting and control
methods via JSON proxy service, used by the UI, or by any subscriber's
data collectors. UI generates a call map, line by line timings,
aggregated resource usage for each decorated callable, and WSGI path
per callable."

it's up here, anyone who logs bugs against it, or tries it out and
likes it, I'd love some feedback (good, bad, or otherwise). Wiki has
some info in there along with screenshots, though I know the docs
aren't amazing.
https://bitbucket.org/dragonfyre13/decorated-profiler

Here's what I'm currently using to point gunicorn to, instead of
wsgibase. Just point it at wsgiwrapper in this file instead:

#!/usr/bin/env python
from gluon.main import wsgibase
from gluon.contrib import decoratedprofiler
wsgiwrapper = decoratedprofiler.ProfilerMiddleware(wsgibase)

Reply via email to