[SciPy-user] Matlab style line based profiling

David Baddeley david_baddeley at yahoo.com.au
Mon Feb 2 06:36:11 EST 2009


Hi all,

a while ago I drummed up a matlab like profiling module which gives times for individual lines. Since then I've found http://packages.python.org/line_profiler/  which seems to be a bit more refined and should be somewhat faster (mine is pure python, both hook the tracing functions). Where my code does have an advantage is that I've got it producing syntax highlighted html with the most expensive lines highlighted in red with the times in the margin, like the matlab profiler. I've also used a variant of the profile on, profile off, profile report syntax which should be familiar to matlab users.

Would like to make it available, but am not sure how much demand there would be for a second line profiler module and whether it wouldn't be more sensible to see if the report generation couldn't be adapted to work with the aforementioned line_profiler module (there might be licensing issues here as my html generation borrows heavily from a GPL licensed python syntax highlighter and I'm not sure if Robert would be keen on having his module tainted). 

have attached the current code and would welcome any input,

Cheers,
David



      Get the world's best email - http://nz.mail.yahoo.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: colorize_db_t.py
Type: text/x-python
Size: 7971 bytes
Desc: not available
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20090202/b66eeb8b/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mProfile.py
Type: text/x-python
Size: 2710 bytes
Desc: not available
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20090202/b66eeb8b/attachment-0001.py>


More information about the SciPy-User mailing list