section description number of nonrecursive function calls total number of calls (including self-recursiontime spent in this function (not counting subfunctionstottime/ncalls total time spent in the function percall cumtime/(primitive callsfilename:lineno(functionlocation and name of each function primitive calls ncalls tottime percall cumtime when there are two numbers in the first column (for example" / ")the latter is the number of primitive calls and the former is the actual number of calls simply inspecting the generated report of the profiler is often enough for most applications of this module--for exampleif you simply want to see how your program is spending its time howeverif you want to save the data and analyze it furtherthe pstats module can be used consult more details about saving and analyzing the profile data tuning and optimization this section covers some general rules of thumb that can be used to make python programs run faster and use less memory the techniques described here are by no means exhaustive but should give programmers some ideas when looking at their own code making timing measurements if you simply want to time long-running python programthe easiest way to do it is often just to run it until the control of something like the unix time command alternativelyif you have block of long-running statements you want to timeyou can insert calls to time clock(to get current reading of the elapsed cpu time or calls to time time(to read the current wall-clock time for examplestart_cpu time clock(start_realtime time(statements statements end_cpu time clock(end_real time time(print("% real seconds(end_real start_real)print("% cpu seconds(end_cpu start_cpu)keep in the mind that this technique really works only if the code to be timed runs for reasonable period of time if you have fine-grained statement you want to benchmarkyou can use the timeit(code [setup]function in the timeit module for examplefrom timeit import timeit timeit('math sqrt( )','import math' timeit('sqrt( )','from math import sqrt' lib fl ff