line_profiler
Line Profiler — line_profiler 4.1.2 documentation
code:py
from line_profiler import profile
@profile
def func():
...
$ LINE_PROFILE=1 python script.py
code:launch.json
"env": {
"LINE_PROFILE": "1",
},
実行速度プロファイリング