3

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!

asked Mar 16, 2016 at 17:19
1
  • The code is a bit long, hence didn't want to add it. Commented Mar 16, 2016 at 17:29

1 Answer 1

1

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

answered Mar 16, 2016 at 17:20

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.