[Python-ideas] Timing hefty or long-running blocks of code

Clay Sweetser clay.sweetser at gmail.com
Sun Jun 2 06:15:10 CEST 2013


    I quite like this proposal. To me, the main advantage of such a context
manager/decorator over the current timeit module is that it can be used for
pieces of code that either can't or shouldn't be arbitrarily repeated.
    For example, I am currently writing a plugin for the sublime text
editor, and it would be very convenient for me to be able to get a quick
summery of timing statistics for functions that make use of the editor's
plugin api to modify documents.
    My only suggestion for the proposed function is to allow the output of
statistics similar to the ones the timeit module allows, such as the mean
runtime of a block of code.

Sincerely, Clay Sweetser
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130602/0f351314/attachment.html>


More information about the Python-ideas mailing list