[issue23552] Have timeit warn about runs that are not independent of each other

Serhiy Storchaka report at bugs.python.org
Wed Mar 18 00:03:55 CET 2015


Serhiy Storchaka added the comment:

Implemented Robert's suggestion.

$ ./python -m timeit -n1 -r 10 -s "import time, random" -- "time.sleep(random.random())"
1 loops, best of 10: 30.2 msec per loop
:0: UserWarning: The test results are likely unreliable. The worst
time (946 msec) was more than four times slower than the best time.

----------
Added file: http://bugs.python.org/file38533/timeit_python_warning_2.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23552>
_______________________________________


More information about the Python-bugs-list mailing list