commit 339ff6fb310c5eca5bc01f6ed1159fcc7d15a961 Author: Robert Collins Date: Wed Mar 18 10:24:16 2015 +1300 Issue #23183: Document the timeit output. diff --git a/Doc/library/timeit.rst b/Doc/library/timeit.rst index 3ef9f3e..ff31c12 100644 --- a/Doc/library/timeit.rst +++ b/Doc/library/timeit.rst @@ -262,6 +262,13 @@ It is possible to provide a setup statement that is executed only once at the be $ python -m timeit -s 'text = "sample string"; char = "g"' 'text.find(char)' 1000000 loops, best of 3: 0.342 usec per loop +In the output, there are three fields. The loop count, which tells you how many +times the statement body was run per timing loop repetition. The repetition +count ('best of 3') which tells you how many times the timing loop was +repeated, and finally the time the statement body took on average within the +best repetition of the timing loop. That is, the time the fastest repetition +took divided by the loop count. + :: >>> import timeit diff --git a/Misc/NEWS b/Misc/NEWS index 328b8d5..e75389c 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -56,6 +56,11 @@ Build - Issue #23585: make patchcheck will ensure the interpreter is built. +Documentation +------------- + +- Issue #23183: Document the timeit output. + What's New in Python 3.5 alpha 2? =================================