How to analyze python performance without completing it?

Since I was writing a Python script using a third-party module, the workload was so heavy that the OS (Linux with 32 GB of memory) killed it every time before it could shut down. We learned from syslog that he ran out of physical memory, so the OS killed her through OOM.

Many modern performance analysis tools, for example. profile requires completion from the script and cannot go to modules that used the script. Therefore, I believe that this should be a normal case when the completion of the script is not available, and performance analysis is necessary desperately in such circumstances. Any tips?

+5
source share
1 answer

From the original question:


A profile is a great tool for analyzing performance and does not require completion, and can enter the module that the script uses. I think it’s best to use a profile for this question.

0
source

Source: https://habr.com/ru/post/1261078/


All Articles