You can install and enable the Execute Time extension mentioned under section entitled '4. ExecuteTime: show when and how long cells ran', here. In the metadata, is the start_time and end_time for each cell, see here. You can use the start time for the first cell and the end_time for the last cell to give you the total time.
Alternatively, you can use an external call to run the notebook from another notebook and use %%time
in that. For example to run the index.ipynb
notebook, in a new notebook execute:
%%time
%run index.ipynb
You could use jupytext, papermill, or nbconvert to run the notebook instead of %run
if you didn't want output displaying in your timing notebook. (I imagine the time to show that output might contribute and could matter in case of somethings you wish to time?) There is an example of using nbconvert and using the -t
flag with the call to scripted version of the notebook to time it here.
Or you could use IPython to call to run the notebook and time this if you didn't want to use an actual separate Jupyter notebook since the %%time
magic is inherited from IPython.