March 2003
Intermediate to advanced
656 pages
39h 30m
English
sort_stats
s.sort_stats(key, *keys)Gives one or more keys (primary first, if more than one) on which to
sort future output. Each key is a string. The sort is descending for
keys indicating times or numbers, alphabetical (ascending) for key
'nfl‘. The most frequently used keys when calling
sort_stats are:
calls'Number of calls to the function (like field 1
covered in print_stats)
cumulative'Cumulative time spent in the function and all functions it called
(like field 4 i covered in
print_stats)
nfl'Name of the function, its module, line number of the function in its
file (like field 6 covered in
print_stats)
time'Total time spent in the function itself, exclusive of functions it
called (like field 2 covered in
print_stats)
Read now
Unlock full access