watson.framework.debug.profile¶
- watson.framework.debug.profile.execute(func, sort_order='cumulative', max_results=20, *args, **kwargs)[source]¶
Profiles a specific function and returns a dict of relevant timings.
Parameters: - sort_order (string) – The order by which to sort
- max_results (int) – The maximum number of results to display
Example:
def func_to_profile(): # do something response, stats = profile.execute(func_to_profile)