vprof
Python package providing rich and interactive visualizations for various Python program characteristics such as running time and memory usage.
vprof is a Python package providing rich and interactive visualizations for various Python program characteristics such as running time and memory usage. It supports Python 3.4+ and distributed under BSD license. The project is in active development and some of its features might not work as expected. Usage is simple:
vprof -c <config> <src>
<config> is a combination of supported modes:
c- CPU flame graph ⚠️ Not available for windows #62
Shows CPU flame graph for <src>.
p- profiler
Runs built-in Python profiler on <src> and displays results.
m- memory graph
Shows objects that are tracked by CPython GC and left in memory after code
execution. Also shows process memory usage after execution of each line of <src>.
h- code heatmap
Displays all executed code of <src> with line run times and execution counts.
<src> can be Python source file (e.g. testscript.py) or path to package
(e.g. myproject/test_package).
To run scripts with arguments use double quotes
vprof -c cmh "testscript.py --foo --bar"