b.l.Stats(object) : class documentation

Part of bzrlib.lsprof View In Hierarchy

Wrapper around the collected data.

A Stats instance is created when the profiler finishes. Normal usage is to use save() to write out the data to a file, or pprint() to write human-readable information to the command line.

Method __init__ Undocumented
Method sort Sort the data by the supplied critera.
Method pprint Pretty-print the data as plain text for human consumption.
Method freeze Replace all references to code objects with string
Method calltree Output profiling data in calltree format (for KCacheGrind).
Method save Save profiling data to a file.
def __init__(self, data, threads):
Undocumented
def sort(self, crit='inlinetime'):
Sort the data by the supplied critera.
Parameterscritthe data attribute used as the sort key.
def pprint(self, top=None, file=None):
Pretty-print the data as plain text for human consumption.
Parameterstoponly output the top n entries. The default value of None means output all data.
filethe output file; if None, output will default to stdout.
def freeze(self):
Replace all references to code objects with string descriptions; this makes it possible to pickle the instance.
def calltree(self, file):
Output profiling data in calltree format (for KCacheGrind).
def save(self, filename, format=None):
Save profiling data to a file.
Parametersfilenamethe name of the output file
format'txt' for a text representation; 'callgrind' for calltree format; otherwise a pickled Python object. A format of None indicates that the format to use is to be found from the filename. If the name starts with callgrind.out, callgrind format is used otherwise the format is given by the filename extension.
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.