This is an old revision of the document!
>>> import cProfile >>> cProfile.run('x = [i for i in range(10000000)]') 4 function calls in 0.719 seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 1 0.568 0.568 0.568 0.568 <string>:1(<listcomp>) 1 0.151 0.151 0.719 0.719 <string>:1(<module>) 1 0.000 0.000 0.719 0.719 {built-in method exec} 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}