The magic command %time
produces the time it takes to execute a given code segment (statement) to the output cell in Jupyter Notebook. I would like this to be appended on to a specified file instead.
My objective is to find the runtime of an algorithm in different settings. I am able to automate the parameters of the algorithm, although not able to store the output of the %time
(and %timeit
) magic command in a file for further processing.
Is this possible?