Ask Your Question

Revision history [back]

Found an alternative solution, this snippet does line profiling of f and of the function g called inside f

def f(a,b,c):
     y=g(b,c)
     return a,y

from line_profiler import LineProfiler

lp = LineProfiler()
lp.add_function(g)
lp_wrapper = lp(f)

s,t = lp_wrapper(a,b,c)
lp.print_stats()