[TIP] Profiling deployed WSGI web apps

Marius Gedminas marius at gedmin.as
Wed May 13 08:11:40 PDT 2009

On Tue, May 12, 2009 at 03:21:54PM -0500, Olemis Lang wrote:
> On Tue, May 12, 2009 at 2:08 PM, Marius Gedminas <marius at gedmin.as> wrote:
> > On Tue, May 12, 2009 at 01:07:27PM -0500, Olemis Lang wrote:
> >> Please ... perhaps this is not related with writing functional tests
> >> and so on, but is undoubtedly related to testing web apps ... thereby
> >> IMHO is not OT to ask this here -CMIIW anyway- :
> >>
> >> Q: How could I use some kind of profiling to discover those parts of a
> >> deployed web app having poor performance in order to start further
> >> analyses to find the root causes -the later feature possibly not
> >> included- ? Is there any WSGI ( or Apache | mod_py-specific )
> >> middleware -filters or whatever- helping with that kind of analysis ?
> >
> > http://pypi.python.org/pypi/keas.profile
> > http://pypi.python.org/pypi/repoze.profile
> Thnx very much !
> However I just wanted to ask something simple before reading about and
> trying'em in detail. Just to save some time ... you know ;o)
> Q: Are they general purpose middleware or are tied to specific
> frameworks (e.g. Zope) ? I mean, can I use them both to analyse any
> WSGI wep app ?

They're both very generic WSGI middleware.  keas.profile profiles each
request separately and appends the profile in a little yellow div at the
bottom of each page.  repoze.profile profiles all the requests and gives
you only a summary profile at a specific URL.  They both can be enabled
rather easily in your paster INI file if you use PasteScript (or is it
PasteDeploy?), and the PyPI pages show you how.

Marius Gedminas
Added mysterious, undocumented --scanflags and --fuzzy options.
        -- nmap 3.0 announcement
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.idyll.org/pipermail/testing-in-python/attachments/20090513/c787c4b1/attachment.pgp 

More information about the testing-in-python mailing list