?

Log in

No account? Create an account

anatomy · of · distance


One for the Pythonistas

Recent Entries · Archive · Friends · Profile

* * *

At work, a project I have been involved in was a bit slow, and we have had the task of profiling it to see why. We started doing the usual ad hoc profiling (now=time.time() / do something / print "something took " time.time()-now), but that was rather tedious.

The project itself has one object class which implements a lot of the data model and operations. So I decided to write a proxy/wrapper class which would wrap any class, time its method calls and output statistics. This soon gained the ability to keep track of which method was calling which other methods, and what was taking up most of the calling time, and to output it in nice tree-formatted dumps.

Anyway, for those who code in Python and might find something like this useful, here it is. There's a Cheese Shop page on it here.
Tags: ,
Current Location:
W11
Current Music:
The Deirdres - Rise And Fall
* * *
* * *
[User Picture]
On September 24th, 2008 04:10 am (UTC), datakid23 commented:
for the plonistas
And for those that use zope/plone:

http://plone.org/products/callprofiler
Replies Frozen · Thread
* * *

Previous Entry · Share · Next Entry