N
N
Nikita Roschenko2015-05-06 11:35:31
Python
Nikita Roschenko, 2015-05-06 11:35:31

Which profiler for Python works in real time?

Good afternoon, there is an application that works with the vk api "vk_api" module and logs in several "threading" threads in the background, 2-3 threads per user. After performing some action via api, time.sleep is triggered in the thread to bypass the limit on the number of requests.
So that's the problem, with the number of users ~> 3 (6-9 threads) during the first 20 minutes, the application works satisfactorily, but somewhere after 20 minutes a lot of RAM starts to be eaten up and the application starts to slow down with sending requests. The more users the program processes, the faster it starts to slow down.
There are suspicions that somewhere there is a memory leak, but since I'm new to Python, I can't figure out where.
A profiler is needed to determine what is spending a lot of memory over time on the displayed information in real time, since the application, by design, runs in an endless loop in the background. And cProfile as far as I understand fulfills only after end of application.
I would be grateful for any advice =)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey K, 2015-05-06
@Avillions

https://pypi.python.org/pypi/memory_profiler

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question