jztools.profile#

Classes

profile(filename)

Usage as a decorator -- the call stats will accumulate and be dumped with every call.

class jztools.profile.profile(filename)#

Bases: object

Usage as a decorator – the call stats will accumulate and be dumped with every call.

@profile('output_file.prof')
def function_to_profile(...):
    ...

Usage as a context manager:

with profile('output_file.prof'):
    ...