summaryrefslogtreecommitdiffstats
path: root/Lib/timeit.py
Commit message (Collapse)AuthorAgeFilesLines
* SF patch 1631942 by Collin Winter:Guido van Rossum2007-01-101-1/+1
| | | | | | (a) "except E, V" -> "except E as V" (b) V is now limited to a simple name (local variable) (c) V is now deleted at the end of the except block
* Patch #1550800: make exec a function.Georg Brandl2006-09-061-1/+1
|
* SF patch #868736: Disable GC for timeitRaymond Hettinger2004-01-041-1/+7
| | | | Make timings more consistent by temporarily disabling GC.
* Show microseconds, milliseconds or seconds, whichever is most natural,Guido van Rossum2003-10-201-1/+9
| | | | rather than showing weird numbers like 8.4e+03 usec.
* Patch #808362: Fix typos.Martin v. Löwis2003-09-201-1/+1
|
* remove unused import mathNeal Norwitz2003-06-291-1/+0
|
* SF bug 735293: Command line timeit.py sets sys.path badlyRaymond Hettinger2003-05-201-0/+5
| | | | | Paul Moore's patch to have timeit.py check the current directory for imports (instead of the directory for Lib/timeit.py).
* add a #! line for unix weeniesSkip Montanaro2003-04-081-0/+2
|
* correct a couple docstring nitsSkip Montanaro2003-04-081-3/+3
|
* Rename variables _seq to _it and seq to it, to emphasize that this isGuido van Rossum2003-03-211-5/+5
| | | | an iterator (which can only be used once!).
* Change the default number of repetitions to 3, both in the Timer classGuido van Rossum2003-03-151-12/+21
| | | | | | | | | (from 10) and in main() (from 1). Add a -v option that shows the raw times. Repeating it cranks up the display precision. Always use the "best of N" form of output.
* Implement some recommendations from Raymond H:Guido van Rossum2003-03-141-10/+48
| | | | | | | | | | - Make all local variables in the template start with an underscore, to prevent name conflicts with the timed code. - Added a method to print a traceback that shows source lines from the expanded template. - Use that method in main().
* Broke down and made it work for Python 2.0 and up. (Older versionsGuido van Rossum2003-03-071-24/+25
| | | | | | | would have required refraining from using string methods -- too painful.) Changed the -s option so that multiple -s options are cumulative.
* Add a note explaining why you shouldn't try to compute mean andGuido van Rossum2003-03-061-0/+14
| | | | | standard deviation. Also add an XXX comment wondering if we should refrain from using itertools.repeat().
* Simpler way to write reindent(), suggested by Raymond H.Guido van Rossum2003-03-061-1/+1
|
* Add notes about baseline overhead, and about different PythonGuido van Rossum2003-03-061-6/+22
| | | | versions. Add -h/--help option to print doc string.
* Added more documentation.Guido van Rossum2003-03-061-9/+73
|
* A flexible utility to time the execution speed of a code snippet.Guido van Rossum2003-03-051-0/+123
Usable from the command line or from a program.