[SciPy-user] Matlab style line based profiling

David Baddeley david_baddeley@yahoo.com...
Mon Feb 2 05:36:11 CST 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://projects.scipy.org/pipermail/scipy-user/attachments/20090202/b66eeb8b/attachment-0002.py 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mProfile.py
Type: text/x-python
Size: 2710 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/scipy-user/attachments/20090202/b66eeb8b/attachment-0003.py 


More information about the SciPy-user mailing list