Given a function like:
do_something_big():
do_1()
do_2()
do_3()
It's easy to get the time it takes to run either do_something_big() or a single instance of do_1(). But assuming I have:
for _ in range(100000):
do_something_big()
Is there an easy way to get how long 100,000 do_1's took? It's not so difficult to do - you'd just time each one and update some global state to keep track of aggregate time. But is there a utility already built that abstracts this for me?