this is not your sawtooth wave (kineticfactory) wrote,
this is not your sawtooth wave

  • Location:
  • Music:

One for the Pythonistas

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: code, python

  • Get Zucked

    It looks like Facebook ads are about to get much more obnoxious. We're talking huge, bandwidth-sucking full-motion video ads along the side of your…

  • Lyrics quiz

    It has been a while since I posted one of these. Below are 10 lyrics from songs. For each one, if you know the artist and song title, post them in…

  • Laura Macfarlane/Hong Kong In The 60s/Hissing At Swans

    Last night, I made a return to putting gigs on. So far, a once-off, though there may well be more gigs in the future. I put on a gig by Laura…

  • 1 comment
  • 1 comment

Comments for this post were locked by the author