Name
print_stats
Synopsis
s
.print_stats(*restrictions
)
Outputs statistics about
s
’s profile data, sorted
according to the latest call to
s
.sort_stats
, and
subject to the given restrictions, if any, as covered in
print_callees
. After a few summary lines (date and
time on which profile data was collected, number of function calls,
and sort criteria used), the output, absent restrictions, is one line
per function, with six fields per line, labeled in a header line. For
each function f
,
print_stats
outputs six fields:
Total number of calls to function
f
Total time spent in function
f
, exclusive of other functions thatf
calledTotal time per call (i.e., field
2
divided by field1
)Cumulative time spent in function
f
, and in all functions directly or indirectly called fromf
Cumulative time per call (i.e., field
4
divided by field1
)The name of function
f
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.