how to measure execution time of functions (automatically) in Python

前端 未结 3 441
无人共我
无人共我 2020-12-13 10:00

I need to have a base class which I will use to inherit other classes which I would like to measure execution time of its functions.

So intead of

3条回答
  •  无人及你
    2020-12-13 10:26

    There is also timeit, which is part of the standard library, and is really easy to use. Remember: don't reinvent the wheel!

提交回复
热议问题