SDK
SDK

Reputation: 31

profiling inside a python function

I am trying to profile a python script, I have identified the bottleneck to be a function using python -m cProfile myscript.py. How do I know which line in the function is the cause for the bottle neck? Can I profile line by line inside a function? Thanks!

Upvotes: 3

Views: 369

Answers (1)

snakecharmerb
snakecharmerb

Reputation: 55963

There is a line profiler package that you use for this.

Upvotes: 1

Related Questions