Reputation: 96448
In IPython, when working with the magic %timeit
does
%timeit statement1; statement2;
measure statement1
or statement1
and statement2
together (sequentially)? I would like to measure the latter.
Upvotes: 0
Views: 133
Reputation: 532303
Both statements. You can confirm using the sleep
function from the time
module:
In [4]: %timeit time.sleep(1); time.sleep(5)
1 loops, best of 3: 6 s per loop
Upvotes: 3