Utils

Profile

Profile

farms_core.utils.profile.profile(function, profile_filename='', **kwargs)

Profile a function with cProfile

If a path is provided, the profile data is saved and can be opend with:

pyprof2calltree -k -i path/to/file.profile

Parameters
  • function (Callable) –

  • profile_filename (str, default: '') –

Return type

None

Transform