Is there a way to force PyCharm to use cProfile?

Answered

I am trying to profile unit-tests using remote interpreter and I am getting errors `[*] [yappi-err] could not find caller pit in _call_leave`. Since it's a remote interpreter inside a VM I don't have much control over libraries installed there. And according to https://www.jetbrains.com/help/pycharm/2016.3/profiler.html "A profiler runs in the following order: vmprof, yappi, cProfile."  So is there a way to tell PyCharm to skip yappi (even though it seems to be installed there) and try cProfile instead? Or is there a way to get more detailed messages about what's wrong with yappi?

Thanks!

0
2 comments

So I was able to solve the problem by commenting out yappi block in .pycharm_helpers/profiler/run_profiler.py, but it would be great to have it as a configuration option.

 

Side note:

for some reason, profiling results from "cProfile" doesn't include some of the functions I am 100% sure were called (because they are directly called in the test), but I guess it's not a PyCharm issue. 

0

> it would be great to have it as a configuration option.

Please vote for the existing feature request https://youtrack.jetbrains.com/issue/PY-19770 to increase its priority and be notified about updates.

0

Please sign in to leave a comment.