[issue5441] Convenience API for timeit.main
Jeremy Metz <metz...@gmail.com> added the comment: More specifically, #6422 also mentions at least in part this functionality, but the main focus there seems to be the autorange function. Propose splitting these two by reopening this use. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue5441> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5441] Convenience API for timeit.main
Jeremy Metz <metz...@gmail.com> added the comment: Don't understand how #6422 addresses this - would also like to see a more convenient API for timing; at present CLI gives a nice formatted output, and timeit.timeit gives just the raw timing in seconds. Would be easy to implement by simply refactoring main() in to the command line parsing component (first ~ 50 lines from https://github.com/python/cpython/blob/master/Lib/timeit.py#L256 to ~https://github.com/python/cpython/blob/master/Lib/timeit.py#L312 ) and actual timing and printing component, which could then be called via API. Am happy to work this up if this can be reopened...? -- nosy: +Jeremy Metz ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue5441> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com