timeit and timeit in IPython
timeit function
timeit command line
line profiler in command line
Using cProfile Preferred Profiler