kernprof module¶
Script to conveniently run profilers on code in a variety of circumstances.
- kernprof.execfile(filename, globals=None, locals=None)[source]¶
Python 3.x doesn’t have ‘execfile’ builtin
- class kernprof.ContextualProfile(*args, **kwds)[source]¶
Bases:
ProfileA subclass of Profile that adds a context manager for Python 2.5 with: statements and a decorator.
- enable_by_count(subcalls=True, builtins=True)[source]¶
Enable the profiler if it hasn’t been enabled before.
- class kernprof.RepeatedTimer(interval, dump_func, outfile)[source]¶
Bases:
objectBackground timer for outputting file every n seconds.