日期和时间模块-timeit
程序运行时间统计模块
查看timeit
模块有哪些函数或方法:
py
$ python
Python 3.6.8 (v3.6.8:3c6b436a57, Dec 24 2018, 02:10:22)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import timeit
>>> timeit.
timeit.default_number timeit.dummy_src_name timeit.main( timeit.sys timeit.timeit(
timeit.default_repeat timeit.gc timeit.reindent( timeit.template timeit.Timer(
timeit.default_timer( timeit.itertools timeit.repeat( timeit.time
>>> exit()
参考: