[IPython-User] Timing cells in notebook

MinRK benjaminrk@gmail....
Tue Apr 10 16:35:18 CDT 2012

On Tue, Apr 10, 2012 at 14:23, Chris Laumann

> Hi all-
> Is there a magical way to time full cell's worth of execution rather than
> single commands? time and timeit are useful but only for one-liners..

I don't think there's a great way to do it right now, but Fernando is
working on the notion of Cell-level magics, which would make this easy.

The kinda crummy options off the top of my head:

* explicit tic = time.time(); toc=time.time() calls
* dumping the contents in a single function call and timing it
* running a cell, and in the *next* cell, doing `%timeit exec(In[5])` to
run it again with the timer.


> Best, C
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20120410/d47718a3/attachment.html 

More information about the IPython-User mailing list