VisualVM equivalent for Python
Asked Answered
A

1

8

I was wondering if there is a Python equivalent of Java's VisualVM. The feature that I need is real-time profiling of a running Python interpreter.

A bit of background: a recent change to my code base slowed it down considerably. I would like to find out what my code is doing without having to restart the calculation. The alternative is to stop the interpreter and to restart it with -m cProfile, losing a day of CPU time.

Any suggestions are greatly appreciated.

Alexine answered 30/5, 2013 at 14:4 Comment(1)
Python has a sys.set_trace that can be set while the program runs. It should be possible to start profiling while the program runs.Discourse
S
1

Have a look here: Is there a visual profiler for Python? and here: Which Python memory profiler is recommended?

From what I found, there isn't really an easy way to do memory profiling if your application is more than just a script. Otherwise the easiest is to use https://pypi.python.org/pypi/memory_profiler.

Salicin answered 20/1, 2016 at 14:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.