This class constructor creates an instance of a “statistics object” from aįilename (or list of filenames) or from a Profile instance. Stats ( *filenames or profile, stream=sys.stdout ) ¶ via a sys.exit() callĭuring the called command/function execution) no profiling results will beĪnalysis of the profiler data is done using the Stats class. Note that profiling will only work if the called command/function actually Profile the cmd via exec() with the specified global and Write the results of the current profile to filename. print_stats ( sort = - 1 ) ¶Ĭreate a Stats object based on the current Stop collecting profiling data and record the results internallyĪs the current profile. Results to a file by specifying a filename to the run() function:Ĭhanged in version 3.8: Added context manager support. Instead of printing the output at the end of the profile run, you can save the Not recurse, these two values are the same, and only the single figure is The second value is the number of primitive callsĪnd the former is the total number of calls. When there are two numbers in the first column (for example 3/1), it means Provides the respective data of each function Is the quotient of cumtime divided by primitive calls filename:lineno(function) This figure is accurate even for recursive functions. Is the cumulative time spent in this and all subfunctions (from invocation Is the quotient of tottime divided by ncalls cumtime The column headings include: ncallsįor the total time spent in the given function (and excluding time made in Next line: Ordered by: cumulative time, indicates that the text string in theįar right column was used to sort the output. Were primitive, meaning that the call was not induced via recursion. The first line indicates that 214 calls were monitored.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |