Popular Python recipes tagged "timing"http://code.activestate.com/recipes/langs/python/tags/timing/2013-12-01T01:39:44-08:00ActiveState Code RecipesA Simple Timing Function (Python)
2013-12-01T01:39:44-08:00Mike Sweeneyhttp://code.activestate.com/recipes/users/4177990/http://code.activestate.com/recipes/578776-a-simple-timing-function/
<p style="color: grey">
Python
recipe 578776
by <a href="/recipes/users/4177990/">Mike Sweeney</a>
(<a href="/recipes/tags/performance/">performance</a>, <a href="/recipes/tags/timing/">timing</a>).
Revision 2.
</p>
<p>This function prints out a message with the elapsed time from the
previous call. It works with most Python 2.x platforms. The function
uses a simple trick to store a persistent variable (clock) without
using a global variable.</p>
A Profiling Tool (Python)
2011-03-04T05:41:04-08:00Shao-chuan Wanghttp://code.activestate.com/recipes/users/4168519/http://code.activestate.com/recipes/577323-a-profiling-tool/
<p style="color: grey">
Python
recipe 577323
by <a href="/recipes/users/4168519/">Shao-chuan Wang</a>
(<a href="/recipes/tags/profiling/">profiling</a>, <a href="/recipes/tags/timing/">timing</a>).
Revision 2.
</p>
<p>This is a decorator for doing the profiling of a function.</p>