Python line_profiler: profiling with subroutines

78 views Asked by At

I'm interested in using line_profiler for a bit of code I wrote for a jupyter notebook file. The function I created makes several calls to other methods from imported packages. Although the line profiler does a great job of showing me which lines in the method I wrote are taking the most time, I'd like to be able to do the same for the methods I call in my function. For example, if my function, foo(), which I'm currently profiling, makes a call to bar(), the line profiler only shows me the overall time it takes to execute bar(). Since bar() is an imported method, is there even a way to have line profiler look into this method to see, or "jump into" the call to see which lines of bar() are taking the most time to execute? I'd really hate to have to write test cases for each individual method from the libraries I'm using if I can just jump into other methods with the profiler.

0

There are 0 answers