[RFC/MERGE] Updates to decorators

Olivier Grisel ogrisel at nuxeo.com
Fri Jan 12 10:12:00 GMT 2007


John Arbash Meinel a écrit :
> I have 2 updates to our current decorators, one follows on the other
> one, but is a little more controversial.
> 
> Basically, I've been doing lsprof testing, and I've been getting
> frustrated with the 'read_locked()' functions. Because in a big test,
> you can have 10 or more @needs_read_lock functions. So when you are
> tracking up from the bottom, or down from the top, you frequently hit a
> barrier which makes it difficult to tell who is calling what. (10
> functions call "read_locked()" and read_locked calls 10 other functions,
> so which is being called without going to the source?)

Kcachegrind provides a nice UI to browse the calltree of a profiled python run.
There exists a python script to convert lsprof output to kcachegrind input:

  http://oubiwann.blogspot.com/2006/08/python-and-kcachegrind.html


Hope this helps,

-- 
Olivier




More information about the bazaar mailing list