[issue30080] Add the --duplicate option for timeit

STINNER Victor report at bugs.python.org
Wed Jun 7 04:14:50 EDT 2017


STINNER Victor added the comment:

About the command line interface, I would expect that "timeit -n 10 --duplicate 10 STMT" would run STMT 100 times. I chose this behaviour in perf timeit:
http://perf.readthedocs.io/en/latest/cli.html#timeit-cmd


Current behaviour chosen by Serhiy, -n3 --duplicate=3 runs STMT 3 times:

$ ./python -m timeit --duplicate=3 -r 1 -n 3 'print("bla")'
bla
bla
bla
3 loops, best of 1: 21.8 usec per loop

----------

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


More information about the Python-bugs-list mailing list